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>
This commit is contained in:
Tomaz Canabrava 2013-09-25 15:05:48 -03:00 committed by Dirk Hohndel
parent 2819ee6510
commit bc837163f5

View file

@ -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()