summaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-26 09:18:57 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-26 09:18:57 -0800
commit5fca06c9e60bdbfb708006d14255d4c28e16aced (patch)
treeed7690320c325092bf91919e4e15aed9a716187b /qt-ui/downloadfromdivecomputer.cpp
parent06875c7cbd7ea58b947817416d02a604a79a765b (diff)
downloadsubsurface-5fca06c9e60bdbfb708006d14255d4c28e16aced.tar.gz
Display warning that dives won't be downloaded when enabling libdc dump
The warning is only shown once per session. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index d8983e9aa..57415fac5 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -45,7 +45,7 @@ DownloadFromDCWidget *DownloadFromDCWidget::instance()
DownloadFromDCWidget::DownloadFromDCWidget(QWidget* parent, Qt::WindowFlags f) :
QDialog(parent, f), thread(0), timer(new QTimer(this)),
- currentState(INITIAL)
+ currentState(INITIAL), dumpWarningShown(false)
{
ui.setupUi(this);
ui.progressBar->hide();
@@ -279,8 +279,14 @@ void DownloadFromDCWidget::checkDumpFile(int state)
{
ui.chooseDumpFile->setEnabled(state == Qt::Checked);
data.libdc_dump = (state == Qt::Checked);
- if (state == Qt::Checked && dumpFile.isEmpty()) {
- pickDumpFile();
+ if (state == Qt::Checked) {
+ if (dumpFile.isEmpty())
+ pickDumpFile();
+ if (!dumpWarningShown) {
+ QMessageBox::warning(this, tr("Warning"),
+ tr("Saving the libdivecomputer dump will NOT download dives to the dive list."));
+ dumpWarningShown = true;
+ }
}
}