浏览代码

wxGUI: fix gselect OnClose() when called from Graphical Modeler

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64857 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 年之前
父节点
当前提交
ec62db89f0
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      gui/wxpython/gui_core/gselect.py

+ 3 - 0
gui/wxpython/gui_core/gselect.py

@@ -2361,6 +2361,9 @@ class VectorCategorySelect(wx.Panel):
             self.OnClose()
 
     def OnClose(self, event=None):
+        if not self.mapdisp:
+            return
+        
         switcher = self.mapdisp.GetToolSwitcher()
         switcher.RemoveCustomToolFromGroup(self.buttonVecSelect.GetId())
         if self._vectorSelect is not None: