Planner: Improve Exit Warning.

Improve the warning shown to the user when closing the application wile
in the planner. We now allow the user to directly discard the planned
dive, save it into the dive log, or cancel the operation altogether.
If they save into the dive log, or if they modified the dive log before
starting the planner, a second warning about the unsaved dive log
changes will be shown.

Signed-off-by: Michael Keller <mikeller@042.ch>
This commit is contained in:
Michael Keller 2024-05-16 14:39:43 +12:00
parent b579342639
commit a66bdb1bf5
2 changed files with 28 additions and 10 deletions

View file

@ -178,6 +178,7 @@ private:
QString filter_import_dive_sites();
static MainWindow *m_Instance;
QString displayedFilename(const std::string &fullFilename);
int saveChangesConfirmationBox(QString message);
bool askSaveChanges();
bool okToClose(QString message);
void closeCurrentFile();