浏览代码

Fixed another display positioning bug--because first display is "0", positioning based on display idx puts it behind the menus at the top of the Mac desktop where the display can't be grabbed and moved.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@35089 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 16 年之前
父节点
当前提交
14f2bf952d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gui/wxpython/wxgui.py

+ 2 - 1
gui/wxpython/wxgui.py

@@ -102,6 +102,7 @@ class GMFrame(wx.Frame):
 
         wx.Frame.__init__(self, parent=parent, id=id, size=(500, 400),
                           style=wx.DEFAULT_FRAME_STYLE)
+                          
         self.SetTitle(self.baseTitle)
         self.SetName("LayerManager")
 
@@ -1177,7 +1178,7 @@ class GMFrame(wx.Frame):
         # use default window layout
         if UserSettings.Get(group='general', key='defWindowPos', subkey='enabled') is True:
             dim = UserSettings.Get(group='general', key='defWindowPos', subkey='dim')
-            idx = 4 + self.disp_idx * 4
+            idx = 4 + (self.disp_idx +1) * 4
             try:
                 x, y = map(int, dim.split(',')[idx:idx + 2])
                 w, h = map(int, dim.split(',')[idx + 2:idx + 4])