diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-09-25 14:11:38 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-09-25 14:11:38 -0300 |
commit | c805e2c9417476b8b73944f8e8ef8425b0741815 (patch) | |
tree | 1d04428ccaca705d6a1a5d1829b7a99e0e620719 /qt-ui | |
parent | 26cec576ee7f8a4833c9727bff95178acb6f883c (diff) | |
download | subsurface-c805e2c9417476b8b73944f8e8ef8425b0741815.tar.gz |
Enable Edition by clicking anywhere on the Cylinders and Weigths.
This patch enables edition on the selected dives as soon
the user press delete or any other column on the Cylinder
/ weigthsystem.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/maintab.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 6688977be..70657039c 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -688,12 +688,18 @@ void MainTab::on_visibility_valueChanged(int value) void MainTab::editCylinderWidget(const QModelIndex& index) { + if (editMode == NONE) + enableEdition(); + if (index.isValid() && index.column() != CylindersModel::REMOVE) ui->cylinders->edit(index); } void MainTab::editWeigthWidget(const QModelIndex& index) { + if (editMode == NONE) + enableEdition(); + if (index.isValid() && index.column() != WeightModel::REMOVE) ui->weights->edit(index); } |