Ask user before exit if some changes are unsaved

Issue #70 resolved
Matthias Schoettle created an issue

Currently when the user presses the ESC key there is a dialog asking whether the user is sure if he/she wants to quit. This can happen anytime in the app regardless of which scene is currently active.

For the DisplayAspectScene there should be a warning in case there are unsaved changes. This could be a warning that is displayed before the general question is shown. The RamAbstractScene has a method shouldExit(), which by default returns true. The RamApp class then takes care of the general dialog.

For DisplayAspectScene shouldExit() should check whether there are unsaved changes and display a warning accordingly (with Yes, No and Cancel options). If the user selects yes, save the current aspect and return true.

The remaining question is, however, what to do when there are multiple unsaved aspects currently open.

Comments (2)

  1. Matthias Schoettle reporter

    Resolved issue #70: DisplayAspectScene has a method to show a confirm dialog to request action on whether the modified aspect should be saved first.

    Instead of just asking whether TouchRAM should be closed, for each modified aspect a confirmation is shown to check whether the aspect should be saved. If the user didn't cancel in one of the dialogs, the previous confirm dialog is shown at the end.

    The SelectScene now confirms closing an aspect before actually closing it. In case the user selects to save the aspect first, the aspect is saved.

    → <<cset 2710f3adb7f0>>

  2. Log in to comment