Skip to content

Refactor Python wizard save behavior and automate script transfer to the corresponding data model object#643

Open
marvinoe21 wants to merge 4 commits into
masterfrom
86-save-button-does-not-save-data
Open

Refactor Python wizard save behavior and automate script transfer to the corresponding data model object#643
marvinoe21 wants to merge 4 commits into
masterfrom
86-save-button-does-not-save-data

Conversation

@marvinoe21
Copy link
Copy Markdown
Collaborator

@marvinoe21 marvinoe21 commented Dec 5, 2025

Description:

Currently, the Python Task wizard and Python Calculator wizard offer a Python editor with the following behavior:

  • Ctrl+S is available both globally in GTlab (for saving the project) and in the Python wizard.
  • In the Python wizard, Ctrl+S only transfers the script from the editor to the data model object (task or calculator); it does not persist the project to disk.
  • Closing the wizard via the Cancel button discards any changes made since the last Ctrl+S in the wizard.
  • Closing the wizard via the wizard's close ("X") button opens a "Do you want to save..." message box, which only allows saving or discarding changes made since the last Ctrl+S in the wizard.

This leads to confusion for users due to inconsistent save behavior between GTlab's main GUI and the wizard.

Changes in this PR:

  • The Save button and Ctrl+S shortcut were removed from the wizard to avoid conflicting behaviors.
  • The script is now automatically transferred from the editor to the corresponding data model object whenever the wizard loses focus (e.g., the user clicks in the main GUI) or when the wizard is closed.
  • The Cancel button and the "Do you want to save..." message box were removed, since all changes are now automatically applied to the data model and can be undone via GTlab's Undo/Redo system.

Benefits:

  • Removes confusion caused by different save mechanisms.
  • Guarantees that changes in the Python editor are always reflected in the data model.
  • Users can edit scripts and execute the corresponding process element immediately without needing to worry about manual saves.
  • When the Python Wizard is open and the user clicks Undo/Redo in the main GUI, the script in the wizard's editor is updated to the corresponding change.

@marvinoe21 marvinoe21 self-assigned this Dec 5, 2025
@marvinoe21 marvinoe21 linked an issue Dec 5, 2025 that may be closed by this pull request
@marvinoe21 marvinoe21 changed the title refactor Python wizard save behavior and automate script transfer to … Refactor Python wizard save behavior and automate script transfer to the corresponding data model object Dec 5, 2025
@marvinoe21 marvinoe21 added this to the 1.9.0 milestone Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save button does not save data

1 participant