mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
06875c7cbd
commit
5fca06c9e6
2 changed files with 10 additions and 3 deletions
|
@ -45,7 +45,7 @@ DownloadFromDCWidget *DownloadFromDCWidget::instance()
|
||||||
|
|
||||||
DownloadFromDCWidget::DownloadFromDCWidget(QWidget* parent, Qt::WindowFlags f) :
|
DownloadFromDCWidget::DownloadFromDCWidget(QWidget* parent, Qt::WindowFlags f) :
|
||||||
QDialog(parent, f), thread(0), timer(new QTimer(this)),
|
QDialog(parent, f), thread(0), timer(new QTimer(this)),
|
||||||
currentState(INITIAL)
|
currentState(INITIAL), dumpWarningShown(false)
|
||||||
{
|
{
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
ui.progressBar->hide();
|
ui.progressBar->hide();
|
||||||
|
@ -279,8 +279,14 @@ void DownloadFromDCWidget::checkDumpFile(int state)
|
||||||
{
|
{
|
||||||
ui.chooseDumpFile->setEnabled(state == Qt::Checked);
|
ui.chooseDumpFile->setEnabled(state == Qt::Checked);
|
||||||
data.libdc_dump = (state == Qt::Checked);
|
data.libdc_dump = (state == Qt::Checked);
|
||||||
if (state == Qt::Checked && dumpFile.isEmpty()) {
|
if (state == Qt::Checked) {
|
||||||
|
if (dumpFile.isEmpty())
|
||||||
pickDumpFile();
|
pickDumpFile();
|
||||||
|
if (!dumpWarningShown) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"),
|
||||||
|
tr("Saving the libdivecomputer dump will NOT download dives to the dive list."));
|
||||||
|
dumpWarningShown = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ private:
|
||||||
QString logFile;
|
QString logFile;
|
||||||
QString dumpFile;
|
QString dumpFile;
|
||||||
QTimer *timer;
|
QTimer *timer;
|
||||||
|
bool dumpWarningShown;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool preferDownloaded();
|
bool preferDownloaded();
|
||||||
|
|
Loading…
Add table
Reference in a new issue