summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-08 18:15:04 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-08 18:15:04 +0900
commit1578c1edb2dd7e74b111e6b6b5c7883c37554235 (patch)
tree58a8a63a7849525a38a7ac21f647c89fba311041 /qt-ui/maintab.cpp
parentbf0bd88226508ca9c2dc8941cde82f72cbe1d371 (diff)
downloadsubsurface-1578c1edb2dd7e74b111e6b6b5c7883c37554235.tar.gz
Be consistent when passing around gas data in the planner
We need to make sure that the correct segment has the correct gas assigned to it - and that those gases are correctly tracked when editing a manually added dive as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index dfcb48a0c..8230cf663 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -538,14 +538,13 @@ void MainTab::rejectChanges()
if (mainWindow() && mainWindow()->dive_list()->selectedTrips.count() == 1){
ui.notes->setText(notesBackup[NULL].notes );
ui.location->setText(notesBackup[NULL].location);
- }else{
+ } else {
if (editMode == ADD) {
// clean up
delete_single_dive(selected_dive);
DivePlannerPointsModel::instance()->cancelPlan();
- }
- else if (editMode == MANUALLY_ADDED_DIVE ){
- DivePlannerPointsModel::instance()->undoEdition();
+ } else if (editMode == MANUALLY_ADDED_DIVE ) {
+ DivePlannerPointsModel::instance()->undoEdition(); // that's BOGUS... just copy the original dive back and be done with it...
}
struct dive *curr = current_dive;
ui.notes->setText(notesBackup[curr].notes );