Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI/preferences: fix saving display dimensions #3116

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading