소스 검색

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 년 전
부모
커밋
4cd1a8a920
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      gui/wxpython/gui_core/mapdisp.py

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

@@ -400,7 +400,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 ShowAllToolbars(self, show=True):
         if not show:  # hide