Explorar el Código

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

Tomas Zigo hace 4 años
padre
commit
af07fc916f
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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):