summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-21 23:10:08 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-25 13:59:04 -0700
commitc6188bbe47469d72bcb9afba69eb27fb39646cc1 (patch)
tree6d33cfcefedda699f396fe42f903321ec7a7ddab /desktop-widgets
parent4467477389cf0d6de8e3797b1941c07162896907 (diff)
downloadsubsurface-c6188bbe47469d72bcb9afba69eb27fb39646cc1.tar.gz
devices: connect DiveComputerModel to undo-command
Instead of modifying the device table directly, call the undo commands. Moreover, don't keep our own copy in the mode - show the original version. Connect to the appropriate signals. This means that the calls from the DiveComputerManagement dialog have to be removed, since this mode of editing is not supported. The whole dialog will be removed in a future commit. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/divecomputermanagementdialog.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/desktop-widgets/divecomputermanagementdialog.cpp b/desktop-widgets/divecomputermanagementdialog.cpp
index bfeddf24f..92f7c2096 100644
--- a/desktop-widgets/divecomputermanagementdialog.cpp
+++ b/desktop-widgets/divecomputermanagementdialog.cpp
@@ -36,22 +36,10 @@ DiveComputerManagementDialog *DiveComputerManagementDialog::instance()
void DiveComputerManagementDialog::tryRemove(const QModelIndex &index)
{
- if (index.column() != DiveComputerModel::REMOVE)
- return;
-
- QMessageBox::StandardButton response = QMessageBox::question(
- this, TITLE_OR_TEXT(
- tr("Remove the selected dive computer?"),
- tr("Are you sure that you want to \n remove the selected dive computer?")),
- QMessageBox::Ok | QMessageBox::Cancel);
-
- if (response == QMessageBox::Ok)
- model->remove(index);
}
void DiveComputerManagementDialog::accept()
{
- model->keepWorkingList();
hide();
close();
}