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>
This commit is contained in:
Tomaz Canabrava 2015-06-22 16:14:42 -03:00 committed by Dirk Hohndel
parent 7071bf0e23
commit e27f9ab0a6

View file

@ -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()