mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
2819ee6510
commit
bc837163f5
1 changed files with 4 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue