Browse Source

wxGUI/vselect: fix delete row from selected features list (#1231)

Tomas Zigo 4 years ago
parent
commit
af07fc916f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      gui/wxpython/gui_core/vselect.py

+ 2 - 0
gui/wxpython/gui_core/vselect.py

@@ -147,6 +147,8 @@ class VectorSelectBase():
         """Delete row in widget
         """
         index = self.slist.GetFocusedItem()
+        if index < 0:
+            return
         category = self.slist.GetItemText(index)
         for item in self.selectedFeatures:
             if int(item['Category']) == int(category):