[GRASS-SVN] r32518 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 4 12:34:41 EDT 2008


Author: martinl
Date: 2008-08-04 12:34:41 -0400 (Mon, 04 Aug 2008)
New Revision: 32518

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py
Log:
cmbarton: Cosmetics: opacity and properties dialogs now CentreOnParent rather than open at upper left corner. (merge from trunk r32514)
- slightly modified, don't force centre on parent when dialog position has been changed


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py	2008-08-04 16:23:41 UTC (rev 32517)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py	2008-08-04 16:34:41 UTC (rev 32518)
@@ -86,7 +86,7 @@
 
         # init associated map display
         self.mapdisplay = mapdisp.MapFrame(self,
-                                           id=wx.ID_ANY, pos=wx.DefaultPosition,
+                                           id=wx.ID_ANY, pos=wx.Point(50,50),
                                            size=globalvar.MAP_WINDOW_SIZE,
                                            style=wx.DEFAULT_FRAME_STYLE,
                                            tree=self, notebook=self.notebook,
@@ -443,6 +443,7 @@
         type = win.GetName()
 
         self.layer_selected.DeleteWindow()
+        dlg.CentreOnParent()
 
         opacity = self.GetPyData(self.layer_selected)[0]['maplayer'].GetOpacity()
         if type == 'staticText':
@@ -684,6 +685,7 @@
                 self.GetPyData(layer)[0]['propwin'].SetFocus()
             else:
                 self.GetPyData(layer)[0]['propwin'].Show()
+            
             return
         
         completed = ''
@@ -748,6 +750,8 @@
             pass
         elif ltype == 'group':
             pass
+        
+        self.GetPyData(layer)[0]['propwin'].CentreOnParent()
 
     def OnActivateLayer(self, event):
         """Click on the layer item.



More information about the grass-commit mailing list