Sfoglia il codice sorgente

wxGUI: don't save default window layout when window is minimized, checking size is not enough on Windows 8

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62050 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 anni fa
parent
commit
e456a6020c
1 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 2 4
      gui/wxpython/gui_core/preferences.py

+ 2 - 4
gui/wxpython/gui_core/preferences.py

@@ -1353,13 +1353,11 @@ class PreferencesDialog(PreferencesBaseDialog):
                 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