[GRASS-SVN] r62050 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 22 08:08:30 PDT 2014


Author: annakrat
Date: 2014-09-22 08:08:30 -0700 (Mon, 22 Sep 2014)
New Revision: 62050

Modified:
   grass/trunk/gui/wxpython/gui_core/preferences.py
Log:
wxGUI: don't save default window layout when window is minimized, checking size is not enough on Windows 8

Modified: grass/trunk/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/preferences.py	2014-09-22 10:58:20 UTC (rev 62049)
+++ grass/trunk/gui/wxpython/gui_core/preferences.py	2014-09-22 15:08:30 UTC (rev 62050)
@@ -1353,13 +1353,11 @@
                 pos  = mapdisp.GetPosition()
                 size = mapdisp.GetSize()
 
-                # window size must be larger than zero
-                if size[0] > 0 and size[1] > 0:
+                # window size must be larger than zero, not minimized
+                if not mapdisp.IsIconized() and (size[0] > 0 and size[1] > 0):
                     dim += ',%d,%d,%d,%d' % (pos[0], pos[1], size[0], size[1])
 
             self.settings.Set(group = 'general', key = 'defWindowPos', subkey = 'dim', value = dim)
-        else:
-            self.settings.Set(group = 'general', key = 'defWindowPos', subkey = 'dim', value = '')
 
         return True
 



More information about the grass-commit mailing list