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

Revert unsaved changes button resets the entire scenario instead #4399

Open
kaskranenburgQ opened this issue Feb 4, 2025 · 1 comment · Fixed by #4403
Open

Revert unsaved changes button resets the entire scenario instead #4399

kaskranenburgQ opened this issue Feb 4, 2025 · 1 comment · Fixed by #4403
Assignees

Comments

@kaskranenburgQ
Copy link
Contributor

kaskranenburgQ commented Feb 4, 2025

The 'Revert unsaved changes' button implies that any unsaved changes that are have been mode to the scenario will be removed and that the scenario go back to the state at the time of the latest save.

Currently, this is not the case. While pressing the button, the scenario will reset all the changes that have been made to the scenario.

This effectively means that the scenario will return to a blank scenario.

Update:
With #4403, we partly solved this issue.
reverting unsaved changes will only work when:

  1. You save your (non-blank) scenario.
  2. Open a different or new scenario
  3. Open your saved scenario.
  4. Make changes
  5. Press the 'revert unsaved changes' button.

If you don't open a different scenario in between, the revert unsaved changes button will revert to a blank scenario since your sessionID will not have changed, causing etmodel to think there is no scenario to revert to.

To fix this @mabijkerk suggests the following:

perhaps we should force a new SessionID anytime you save a version?

@kaskranenburgQ
Copy link
Contributor Author

Some first investigation by @noracato led that this issue could be fixed by the removal of the following line of code:

self.preset_scenario_id = nil # to go back to a blank slate scenario

I could not properly test this yet, due to some issues with scenario saving locally.

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 a pull request may close this issue.

3 participants