Browse Source

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 3 năm trước cách đây
mục cha
commit
a44cfafe55
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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"""