mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +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) :
|
||||
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()) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ private:
|
|||
QString logFile;
|
||||
QString dumpFile;
|
||||
QTimer *timer;
|
||||
bool dumpWarningShown;
|
||||
|
||||
public:
|
||||
bool preferDownloaded();
|
||||
|
|
Loading…
Reference in a new issue