Bläddra i källkod

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

Tomas Zigo 4 år sedan
förälder
incheckning
af07fc916f
1 ändrade filer med 2 tillägg och 0 borttagningar
  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):