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 PreferencesDialog class OnSave method #3368

Merged
merged 2 commits into from
Jan 21, 2024

Conversation

landam
Copy link
Member

@landam landam commented Jan 18, 2024

Currently saving preferences in Graphical Modeler (same applies to Map Swipe) fails with:

Traceback (most recent call last):
  File "/home/martin/src/grass/dist.x86_64-pc-linux-gnu/gui/wxpython/gmodeler/preferences.py", line 631, in OnSave
    PreferencesBaseDialog.OnSave(self, event)
  File "/home/martin/src/grass/dist.x86_64-pc-linux-gnu/gui/wxpython/gui_core/preferences.py", line 209, in OnSave
    memorymb = self.memorymb.GetValue()
               ^^^^^^^^^^^^^
AttributeError: 'PreferencesDialog' object has no attribute 'memorymb'

The variable self.memorymb is defined in gui._core.preferences.PreferencesDialog. This PR fixes this bug by moving relevant code from gui._core.preferences.PreferencesBaseDialog.OnSave() to a new method gui._core.preferences.PreferencesBaseDialog.OnSave() .

@landam landam added bug Something isn't working GUI wxGUI related labels Jan 18, 2024
@landam landam added this to the 8.4.0 milestone Jan 18, 2024
@landam landam self-assigned this Jan 18, 2024
@github-actions github-actions bot added the Python Related code is in Python label Jan 18, 2024
@landam
Copy link
Member Author

landam commented Jan 18, 2024

See related bdf631b and #3307

@landam landam requested a review from tmszi January 18, 2024 22:45
@tmszi tmszi changed the title gmodeler preferences onsave broken wxGUI/preferences: fix PreferencesDialog class OnSave method Jan 19, 2024
@landam landam merged commit aec3432 into OSGeo:main Jan 21, 2024
23 checks passed
@landam landam deleted the preferences_onsave branch January 21, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants