Undo: update dive list if trip changed

In tree-mode, the trip locations are displayed. Update the corresponding
entries if the trip changed, by hooking into the tripChanged() signal.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-02-24 23:02:22 +01:00 committed by Dirk Hohndel
parent 7924c7dafb
commit e7063b6b08
2 changed files with 16 additions and 1 deletions

View file

@ -3,6 +3,7 @@
#define DIVETRIPMODEL_H
#include "core/dive.h"
#include "core/subsurface-qt/DiveListNotifier.h"
#include <QAbstractItemModel>
// There are two different representations of the dive list:
@ -112,6 +113,7 @@ public slots:
void divesTimeChanged(dive_trip *trip, timestamp_t delta, const QVector<dive *> &dives);
void divesMovedBetweenTrips(dive_trip *from, dive_trip *to, bool deleteFrom, bool createTo, const QVector<dive *> &dives);
void currentDiveChanged();
void tripChanged(dive_trip *trip, TripField);
public:
DiveTripModelTree(QObject *parent = nullptr);