From c805e2c9417476b8b73944f8e8ef8425b0741815 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 25 Sep 2013 14:11:38 -0300 Subject: 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 --- qt-ui/maintab.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui/maintab.cpp') 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); } -- cgit v1.2.3-70-g09d2