Sfoglia il codice sorgente

wxGUI/forms: check if event is not None

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52994 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 anni fa
parent
commit
4c327f12fd
1 ha cambiato i file con 6 aggiunte e 5 eliminazioni
  1. 6 5
      gui/wxpython/gui_core/forms.py

+ 6 - 5
gui/wxpython/gui_core/forms.py

@@ -1812,11 +1812,12 @@ class CmdPanel(wx.Panel):
 
         self.Layout()
 
-        # skip is needed for wx.Notebook on Windows
-        event.Skip()
-        # this is needed for dialogs launched from layer manager
-        # event is somehow propagated?
-        event.StopPropagation()
+        if event:
+            # skip is needed for wx.Notebook on Windows
+            event.Skip()
+            # this is needed for dialogs launched from layer manager
+            # event is somehow propagated?
+            event.StopPropagation()
 
     def OnColorChange(self, event):
         myId = event.GetId()