Преглед изворни кода

wxGUI: destroy/hide dialog on wx.EVT_CLOSE

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32022 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa пре 17 година
родитељ
комит
c0c3738062
2 измењених фајлова са 3 додато и 7 уклоњено
  1. 2 1
      gui/wxpython/gui_modules/goutput.py
  2. 1 6
      gui/wxpython/gui_modules/menuform.py

+ 2 - 1
gui/wxpython/gui_modules/goutput.py

@@ -105,7 +105,8 @@ class GMConsole(wx.Panel):
         """
         if Debug.get_level() == 0:
             # don't redirect when debugging is enabled
-            sys.stderr = self.cmd_stderr
+            # sys.stderr = self.cmd_stderr
+            pass
             return True
 
         return False

+ 1 - 6
gui/wxpython/gui_modules/menuform.py

@@ -711,7 +711,7 @@ class mainFrame(wx.Frame):
                          flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
                          border=5)
 
-        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
+        self.Bind(wx.EVT_CLOSE, self.OnCancel)
 
         #constrained_size = self.notebookpanel.GetSize()
         # 80 takes the tabbar into account
@@ -840,11 +840,6 @@ class mainFrame(wx.Frame):
             
         event.Skip()
 
-    def OnCloseWindow(self, event):
-        """Close the main window"""
-        self.MakeModal(False)
-        self.Destroy()
-
     def OnAbout(self, event):
         """General 'about' information"""
         dlg = wx.MessageDialog(self, _("This is a sample program for\n"