Explorar el Código

wxGUI/gui_core: enable/disable toolbar long help if toolbar exists (#1922)

e.g. switch from 2D view -> Vector digitizer and then quit digitizer
Tomas Zigo hace 3 años
padre
commit
a44cfafe55
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      gui/wxpython/gui_core/mapdisp.py

+ 2 - 1
gui/wxpython/gui_core/mapdisp.py

@@ -335,7 +335,8 @@ class MapFrameBase(wx.Frame):
     def StatusbarEnableLongHelp(self, enable=True):
         """Enable/disable toolbars long help"""
         for toolbar in six.itervalues(self.toolbars):
-            toolbar.EnableLongHelp(enable)
+            if toolbar:
+                toolbar.EnableLongHelp(enable)
 
     def IsStandalone(self):
         """Check if map frame is standalone"""