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 <exhora.tat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Taiane Ramos 2013-11-05 23:15:19 -02:00 committed by Dirk Hohndel
parent 1c3a1a9592
commit abd54cad61

View file

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