summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-04 06:42:21 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-04 06:43:36 -0800
commit71f3a2981942808af58befa4987ac3546cf04391 (patch)
tree83a2fbd999a81da3a96cc8ab67d369b836bba869 /qt-ui
parent6d1e44f05ca87a566fea1af6df76a91d7b0b8ad2 (diff)
downloadsubsurface-71f3a2981942808af58befa4987ac3546cf04391.tar.gz
Trip editing: zero out potential previous edits
This was silly; if we rely on this to be zero to indicate no change then we better zero it out when we start editing. Fixes #805 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index efbd3bc20..c5823132f 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -310,6 +310,7 @@ void MainTab::enableEdition(EditMode newEditMode)
if (MainWindow::instance() && MainWindow::instance()->dive_list()->selectedTrips().count() == 1) {
// we are editing trip location and notes
displayMessage(tr("This trip is being edited."));
+ memset(&displayedTrip, 0, sizeof(displayedTrip));
currentTrip = current_dive->divetrip;
ui.dateEdit->setEnabled(false);
editMode = TRIP;