Ver código fonte

Cosmetics: opacity and properties dialogs now CentreOnParent rather than open at upper left corner.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32514 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 16 anos atrás
pai
commit
56a4d09b00
1 arquivos alterados com 6 adições e 1 exclusões
  1. 6 1
      gui/wxpython/gui_modules/wxgui_utils.py

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

@@ -94,7 +94,7 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
 
         # 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,
@@ -466,6 +466,7 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
         
         dlg = gdialogs.SetOpacityDialog(self, opacity=current_opacity,
                                         title=_("Set opacity <%s>") % maplayer.GetName())
+        dlg.CentreOnParent()
 
         if dlg.ShowModal() == wx.ID_OK:
             new_opacity = dlg.GetOpacity() # string            
@@ -699,6 +700,8 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
                 self.GetPyData(layer)[0]['propwin'].SetFocus()
             else:
                 self.GetPyData(layer)[0]['propwin'].Show()
+            
+            self.GetPyData(layer)[0]['propwin'].CentreOnParent()
             return
         
         completed = ''
@@ -768,6 +771,8 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
             pass
         elif ltype == 'group':
             pass
+        
+        self.GetPyData(layer)[0]['propwin'].CentreOnParent()
 
     def OnActivateLayer(self, event):
         """Double click on the layer item.