Add "download into private trip" dialog checkmark

This adds a checkbox for the divecomputer download dialog that allows you
to tell the download to put the newly downloaded dives into a trip of
their own. That in turn will disable the dive merging with any existing
dives, which means that you will not mix up your newly downloaded dives
with any old dives.

That, in turn, is very convenient of you know that some of the dives were
done by other divers (or from testing that happened during servicing etc),
or the dive dates etc were wrong because the dive computer date had reset
due to battery changes etc.

Once you have all the dives in a private trip of their own, you can then
fix them up (delete dives you don't want to merge etc), and then after all
the data is ok you might want to merge the cleaned-up results with
previous trips etc, and then manually ask subsurface to merge the dives or
whatever.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2014-07-24 13:59:11 -07:00 committed by Dirk Hohndel
parent 87ca15c5c3
commit 5b14ed16ac
5 changed files with 41 additions and 9 deletions

View file

@ -284,6 +284,8 @@ void DownloadFromDCWidget::on_ok_clicked()
data.descriptor = descriptorLookup[ui.vendor->currentText() + ui.product->currentText()];
data.force_download = ui.forceDownload->isChecked();
data.create_new_trip = ui.createNewTrip->isChecked();
data.trip = NULL;
data.deviceid = data.diveid = 0;
set_default_dive_computer(data.vendor, data.product);
set_default_dive_computer_device(data.devname);
@ -413,6 +415,7 @@ void DownloadFromDCWidget::markChildrenAsDisabled()
ui.vendor->setDisabled(true);
ui.product->setDisabled(true);
ui.forceDownload->setDisabled(true);
ui.createNewTrip->setDisabled(true);
ui.preferDownloaded->setDisabled(true);
ui.ok->setDisabled(true);
ui.search->setDisabled(true);
@ -428,6 +431,7 @@ void DownloadFromDCWidget::markChildrenAsEnabled()
ui.vendor->setDisabled(false);
ui.product->setDisabled(false);
ui.forceDownload->setDisabled(false);
ui.createNewTrip->setDisabled(false);
ui.preferDownloaded->setDisabled(false);
ui.ok->setDisabled(false);
ui.cancel->setDisabled(false);