From abd54cad611fe0fc962ccbbb1f2d0dab24580daf Mon Sep 17 00:00:00 2001 From: Taiane Ramos Date: Tue, 5 Nov 2013 23:15:19 -0200 Subject: Fix for equipment tab cancel button bug On equipment tab, when editing a cell and then clicking on cancel button, it would delete all the cylinders table. Now it performs the original behaviour of recovering the original value of the cell and don't delete the table. Signed-off-by: exhora Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 69d1b0b15..dfcb48a0c 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -588,7 +588,7 @@ void MainTab::rejectChanges() mydive->weightsystem[i] = notesBackup[mydive].weightsystem[i]; } } - if (selected_dive > 0) { + if (selected_dive >= 0) { multiEditEquipmentPlaceholder = *get_dive(selected_dive); cylindersModel->setDive(&multiEditEquipmentPlaceholder); weightModel->setDive(&multiEditEquipmentPlaceholder); -- cgit v1.2.3-70-g09d2