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>
This commit is contained in:
Dirk Hohndel 2015-01-04 06:42:21 -08:00
parent 6d1e44f05c
commit 71f3a29819

View file

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