فهرست منبع

wxGUI: switch to Command output only if need
center rules dialog on screen
(merge from devbr6, https://trac.osgeo.org/grass/changeset/33961)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33964 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 سال پیش
والد
کامیت
2f8ef7bc52
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      gui/wxpython/wxgui.py

+ 6 - 2
gui/wxpython/wxgui.py

@@ -416,7 +416,10 @@ class GMFrame(wx.Frame):
         if cmd[:2] == 'd.' and not self.curr_page:
             self.NewDisplay(show=True)
         
-        self.goutput.RunCmd(cmd, switchPage=True)
+        if len(cmd.split(' ')) > 1:
+            self.goutput.RunCmd(cmd, switchPage=True)
+        else:
+            self.goutput.RunCmd(cmd, switchPage=False)
         
         self.OnUpdateStatusBar(None)
 
@@ -907,9 +910,10 @@ class GMFrame(wx.Frame):
                 
         if command[0] == 'r.colors' or command[0] == 'vcolors':
             ctable = colorrules.ColorTable(self, cmd=command[0])
-            ctable.Show()      
+            ctable.Show()
         else:
             dlg = rules.RulesText(self, cmd=command)
+            dlg.CenterOnScreen()
             if dlg.ShowModal() == wx.ID_OK:
                 gtemp = utils.GetTempfile()
                 output = open(gtemp, "w")