Maintab: fix trip location / notes editing

Reusing the displayed_dive for this caused all kind of odd problems that
were hard to reproduce, because the behavior depended on what was in the
corresponding fields of the current_dive. Worse: the GPS location handling
prevented us from reliably removing the location of a trip.

The solution isn't ideal and certainly isn't elegant. Maybe we simply
shouldn't reuse the widget here. But I think what I have now works - I
tried hard to make it break again and couldn't.

Fixes #659

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-07-30 08:52:11 -07:00
parent aa4cd34032
commit 1a978a0345
2 changed files with 32 additions and 16 deletions

View file

@ -104,6 +104,8 @@ private:
void saveTags();
void updateGpsCoordinates(const struct dive *dive);
void markChangedWidget(QWidget *w);
dive_trip_t *currentTrip;
dive_trip_t displayedTrip;
};
#endif // MAINTAB_H