Parcourir la source

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

Tomas Zigo il y a 4 ans
Parent
commit
3eb01a6be2
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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):