From 71f3a2981942808af58befa4987ac3546cf04391 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 4 Jan 2015 06:42:21 -0800 Subject: 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 --- qt-ui/maintab.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qt-ui') 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; -- cgit v1.2.3-70-g09d2