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/gmodeler: fix storing current model settings to model file #3188

Merged

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Sep 24, 2023

Describe the bug
Saving the Graphical Modeler current model settings to model file fails and prints an error message if Graphical Modeler window is closed.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Graphical Modeler g.gui.gmodeler
  2. Add GRASS tool (module) to model e.g. simple module command db.test test1
  3. Validate model
  4. Run model
  5. Close Graphical Modeler window by keyboard shortcut Alt + F4 or via toolbar Quit tool
  6. On the confirm save current model settings to model file dialog hit Yes button
  7. See error
Traceback (most recent call last):
  File "/usr/lib64/grass84/gui/wxpython/gmodeler/frame.py", line 373, in OnCloseWindow
    self.OnWorkspaceSaveAs()
AttributeError: 'ModelFrame' object has no attribute 'OnWorkspaceSaveAs'

Expected behavior
Saving Graphical Modeler current model settings to model file should work and not printing an error message if Graphical Modeler window is closed.

System description:

  • Operating System: all
  • GRASS GIS version: all
GRASS nc_spm_08_grass7/PERMANENT:~ > python3 -c "import sys, wx; print(sys.version); print(wx.version())"
3.10.13 (main, Sep 16 2023, 22:24:59) [GCC 12.3.1 20230526]
4.2.0 gtk3 (phoenix) wxWidgets 3.2.2.1

If the Graphical Modeler window is closed.
@tmszi tmszi added bug Something isn't working GUI wxGUI related backport to 8.3 labels Sep 24, 2023
@tmszi tmszi added this to the 8.3.1 milestone Sep 24, 2023
@tmszi tmszi merged commit 508578d into OSGeo:main Sep 26, 2023
18 checks passed
tmszi added a commit to tmszi/grass that referenced this pull request Sep 26, 2023
tmszi added a commit to tmszi/grass that referenced this pull request Sep 26, 2023
@tmszi tmszi deleted the wxgui-gmodeler-fix-save-current-model-settings-to-file branch September 26, 2023 11:51
landam pushed a commit to landam/grass that referenced this pull request Oct 25, 2023
landam added a commit to landam/grass that referenced this pull request Nov 6, 2023
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants