Переглянути джерело

wxGUI: switch to 'Command output' OnCmdOutput()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32484 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 17 роки тому
батько
коміт
a7d0fc94de

+ 4 - 6
gui/wxpython/gui_modules/goutput.py

@@ -254,12 +254,6 @@ class GMConsole(wx.Panel):
         except:
             curr_disp = None
 
-        # switch to 'Command output'
-        # if hasattr(self.parent, "curr_page"):
-            # change notebook page only for Layer Manager
-            # if self.parent.notebook.GetSelection() != 1:
-            # self.parent.notebook.SetSelection(1)
-        
         # command given as a string ?
         try:
             cmdlist = command.strip().split(' ')
@@ -375,6 +369,10 @@ class GMConsole(wx.Panel):
         message = event.text
         type  = event.type
         
+        # switch to 'Command output'
+        if self.parent.notebook.GetSelection() != self.parent.goutput.pageid:
+            self.parent.notebook.SetSelection(self.parent.goutput.pageid)
+
         # message prefix
         if type == 'warning':
             messege = 'WARNING: ' + message

+ 0 - 4
gui/wxpython/gui_modules/menuform.py

@@ -799,10 +799,6 @@ class mainFrame(wx.Frame):
         if cmd == [] or cmd == None:
             return
 
-        # change page if needed
-        if self.notebookpanel.notebook.GetSelection() != self.notebookpanel.goutput.pageid:
-            self.notebookpanel.notebook.SetSelection(self.notebookpanel.goutput.pageid)
-
         if cmd[0][0:2] != "d.":
             # Send any non-display command to parent window (probably wxgui.py)
             # put to parents