Explorar o código

wxGUI/nviz: fix update list of surface in vector page during delete constant surface (#881)

Tomas Zigo %!s(int64=4) %!d(string=hai) anos
pai
achega
8918567aee
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      gui/wxpython/nviz/tools.py

+ 3 - 1
gui/wxpython/nviz/tools.py

@@ -2714,7 +2714,9 @@ class NvizToolWindow(FN.FlatNotebook):
         for vtype in ('points', 'lines'):
             checklist = self.FindWindowById(
                 self.win['vector'][vtype]['surface'])
-            checklist.Delete(checklist.FindString(name))
+            item = checklist.FindString(name)
+            if item > wx.NOT_FOUND:
+                checklist.Delete(item)
 
         if self.mapDisplay.IsAutoRendered():
             self.mapWindow.Refresh(False)