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>
This commit is contained in:
Tomaz Canabrava 2013-09-25 14:11:38 -03:00
parent 26cec576ee
commit c805e2c941

View file

@ -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);
}