summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-06-22 16:14:42 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-22 17:09:48 -0700
commite27f9ab0a64dd00fec375174ecae3e0782fb1097 (patch)
tree64139cab4937337c2d3a9893cb1d7fa0a6f2f615 /qt-ui
parent7071bf0e238138f17254b66525d790d176b49a6f (diff)
downloadsubsurface-e27f9ab0a64dd00fec375174ecae3e0782fb1097.tar.gz
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 <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp11
1 files changed, 10 insertions, 1 deletions
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()