Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GUI: looping over GetSelections() results in removal of all list items (
OSGeo#2511) * GUI: wx.ListBox is dynamic – looping over GetSelections() results in removal of all list items When the last item returned by GetSelections() has been .Delete()'d a new item is selected. The newly selected item is added to GetSelections(). If user selects the last item from a list, looping over GetSelections() output eventually will remove all list items not only ones selected by the user. This is a workaround by freezing user selection in a list and iterating it in a reverse order as each .Delete() call updates the ListBox and thus changes positions of selected items. Reverse traversal ensures that no selected item gets a new position in the list.
- Loading branch information