[GRASS-SVN] r33964 - grass/trunk/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 21 18:07:15 EDT 2008


Author: martinl
Date: 2008-10-21 18:07:14 -0400 (Tue, 21 Oct 2008)
New Revision: 33964

Modified:
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: switch to Command output only if need
       center rules dialog on screen
(merge from devbr6, r33961)


Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2008-10-21 22:07:13 UTC (rev 33963)
+++ grass/trunk/gui/wxpython/wxgui.py	2008-10-21 22:07:14 UTC (rev 33964)
@@ -416,7 +416,10 @@
         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 @@
                 
         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")



More information about the grass-commit mailing list