瀏覽代碼

wxGUI: center dialogs on their parents in startup and psmap

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70533 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 8 年之前
父節點
當前提交
652c57efa0
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      gui/wxpython/gis_set.py
  2. 1 1
      gui/wxpython/psmap/frame.py

+ 2 - 2
gui/wxpython/gis_set.py

@@ -540,13 +540,13 @@ class GRASSStartup(wx.Frame):
                     'name': gWizard.georeffile}
                 dlg = wx.MessageDialog(parent=self, message=message, caption=_(
                     "Import data?"), style=wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION)
-                dlg.CenterOnScreen()
+                dlg.CenterOnParent()
                 if dlg.ShowModal() == wx.ID_YES:
                     self.ImportFile(gWizard.georeffile)
                 dlg.Destroy()
             if gWizard.default_region:
                 defineRegion = RegionDef(self, location=gWizard.location)
-                defineRegion.CenterOnScreen()
+                defineRegion.CenterOnParent()
                 defineRegion.ShowModal()
                 defineRegion.Destroy()
 

+ 1 - 1
gui/wxpython/psmap/frame.py

@@ -514,7 +514,7 @@ class PsMapFrame(wx.Frame):
         """Specify paper size, margins and orientation"""
         id = self.instruction.FindInstructionByType('page').id
         dlg = PageSetupDialog(self, id=id, settings=self.instruction)
-        dlg.CenterOnScreen()
+        dlg.CenterOnParent()
         val = dlg.ShowModal()
         if val == wx.ID_OK:
             self.canvas.SetPage()