From e27f9ab0a64dd00fec375174ecae3e0782fb1097 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 22 Jun 2015 16:14:42 -0300 Subject: [PATCH] Show warning if user loads an old datafile Show the user a warning if he opens an old version of the divelog file, the warning tries to explain some things that are different on the new version. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index fd85b2c8a..03d278e9e 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1542,9 +1542,18 @@ void MainWindow::loadFiles(const QStringList fileNames) addRecentFile(fileNames); removeRecentFile(failedParses); - refreshDisplay(); ui.actionAutoGroup->setChecked(autogroup); + + if (get_min_datafile_version() < DATAFORMAT_VERSION) { + QMessageBox::warning(this, tr("Opening datafile from older version"), + tr("You opened a data file from an older version of Subsurface. We recommend\n " + "to read the manual to learn about the changes in the new version, especially\n" + "about dive site management which changed significantly.\n" + "Subsurface already tried to prepopulate the data but it might be worth\n" + "while to take a look at the new dive site management system and to make\n" + "sure that everything looks correct.")); + } } void MainWindow::on_actionImportDiveLog_triggered()