aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-09-25 15:05:48 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-25 12:48:24 -0700
commitbc837163f505a8d9722a0cea5d71ce998b79d7d4 (patch)
tree48e83f167d8058567facad6884486bd094cdb05e /qt-ui
parent2819ee6510c2a1ecab503ac658e614c2d575d79a (diff)
downloadsubsurface-bc837163f505a8d9722a0cea5d71ce998b79d7d4.tar.gz
Hook 'Add' from cylinders and weigths to enable Edition
This code hooks the plus button on both cylinders and weigthsystem tables to trigger the enableEdition() and thus the work done when you click on + will be saved / discarted when the user cancels the plan or accepts it. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 9b774859e..c10d8737d 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -374,14 +374,16 @@ void MainTab::updateDiveInfo(int dive)
void MainTab::addCylinder_clicked()
{
+ if(editMode == NONE)
+ enableEdition();
cylindersModel->add();
- mark_divelist_changed(TRUE);
}
void MainTab::addWeight_clicked()
{
+ if(editMode == NONE)
+ enableEdition();
weightModel->add();
- mark_divelist_changed(TRUE);
}
void MainTab::reload()