Skip to content

Commit

Permalink
wxGUI/preferences: fix saving display dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa committed Aug 8, 2023
1 parent b5cf23b commit 27d8b35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gui/wxpython/gui_core/mapdisp.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ def IsFullScreen(self):
return self.GetParent().IsFullScreen()

def IsIconized(self):
self.GetParent().IsIconized()
return self.GetParent().IsIconized()

def Maximize(self):
self.GetParent().Maximize()
Expand Down
3 changes: 1 addition & 2 deletions gui/wxpython/gui_core/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -1850,10 +1850,9 @@ def _updateSettings(self):
for mapdisp in self._giface.GetAllMapDisplays():
pos = mapdisp.GetPosition()
size = mapdisp.GetSize()

# window size must be larger than zero, not minimized
# do not save dim when mapdisp is docked within single window
if (not mapdisp.IsDockable() or not mapdisp.IsDocked()) and (
if (hasattr(mapdisp, "IsIconized") and not mapdisp.IsIconized()) and (
size[0] > 0 and size[1] > 0
):
dim += f",{pos[0]},{pos[1]},{size[0]},{size[1]}"
Expand Down

0 comments on commit 27d8b35

Please sign in to comment.