diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 73402cdad..ed5542fcc 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -715,9 +715,12 @@ DiveTripModelTree::DiveTripModelTree(QObject *parent) : DiveTripModelBase(parent connect(&diveListNotifier, &DiveListNotifier::divesSelected, this, &DiveTripModelTree::divesSelected); connect(&diveListNotifier, &DiveListNotifier::tripChanged, this, &DiveTripModelTree::tripChanged); connect(&diveListNotifier, &DiveListNotifier::filterReset, this, &DiveTripModelTree::filterReset); - connect(&diveListNotifier, &DiveListNotifier::cylinderAdded, this, &DiveTripModelTree::cylinderChanged); - connect(&diveListNotifier, &DiveListNotifier::cylinderEdited, this, &DiveTripModelTree::cylinderChanged); - connect(&diveListNotifier, &DiveListNotifier::cylinderRemoved, this, &DiveTripModelTree::cylinderChanged); + connect(&diveListNotifier, &DiveListNotifier::cylinderAdded, this, &DiveTripModelTree::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::cylinderEdited, this, &DiveTripModelTree::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::cylinderRemoved, this, &DiveTripModelTree::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::pictureOffsetChanged, this, &DiveTripModelTree::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::picturesRemoved, this, &DiveTripModelTree::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::picturesAdded, this, &DiveTripModelTree::diveChanged); populate(); } @@ -1255,7 +1258,7 @@ void DiveTripModelTree::divesChanged(const QVector &dives) { divesChangedTrip(trip, divesInTrip); }); } -void DiveTripModelTree::cylinderChanged(dive *d) +void DiveTripModelTree::diveChanged(dive *d) { divesChanged(QVector { d }); } @@ -1476,9 +1479,12 @@ DiveTripModelList::DiveTripModelList(QObject *parent) : DiveTripModelBase(parent connect(&diveListNotifier, &DiveListNotifier::divesTimeChanged, this, &DiveTripModelList::divesTimeChanged); connect(&diveListNotifier, &DiveListNotifier::divesSelected, this, &DiveTripModelList::divesSelected); connect(&diveListNotifier, &DiveListNotifier::filterReset, this, &DiveTripModelList::filterReset); - connect(&diveListNotifier, &DiveListNotifier::cylinderAdded, this, &DiveTripModelList::cylinderChanged); - connect(&diveListNotifier, &DiveListNotifier::cylinderEdited, this, &DiveTripModelList::cylinderChanged); - connect(&diveListNotifier, &DiveListNotifier::cylinderRemoved, this, &DiveTripModelList::cylinderChanged); + connect(&diveListNotifier, &DiveListNotifier::cylinderAdded, this, &DiveTripModelList::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::cylinderEdited, this, &DiveTripModelList::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::cylinderRemoved, this, &DiveTripModelList::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::pictureOffsetChanged, this, &DiveTripModelList::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::picturesRemoved, this, &DiveTripModelList::diveChanged); + connect(&diveListNotifier, &DiveListNotifier::picturesAdded, this, &DiveTripModelList::diveChanged); populate(); } @@ -1632,7 +1638,7 @@ void DiveTripModelList::divesChanged(const QVector &divesIn) initSelection(); } -void DiveTripModelList::cylinderChanged(dive *d) +void DiveTripModelList::diveChanged(dive *d) { divesChanged(QVector { d }); } diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h index 332dc59f8..3e7955b5b 100644 --- a/qt-models/divetripmodel.h +++ b/qt-models/divetripmodel.h @@ -115,7 +115,7 @@ public slots: void divesMovedBetweenTrips(dive_trip *from, dive_trip *to, bool deleteFrom, bool createTo, const QVector &dives); void diveSiteChanged(dive_site *ds, int field); void divesChanged(const QVector &dives); - void cylinderChanged(dive *d); + void diveChanged(dive *d); void divesTimeChanged(timestamp_t delta, const QVector &dives); void divesSelected(const QVector &dives); void tripChanged(dive_trip *trip, TripField); @@ -191,7 +191,7 @@ public slots: void divesDeleted(dive_trip *trip, bool deleteTrip, const QVector &dives); void diveSiteChanged(dive_site *ds, int field); void divesChanged(const QVector &dives); - void cylinderChanged(dive *d); + void diveChanged(dive *d); void divesTimeChanged(timestamp_t delta, const QVector &dives); // Does nothing in list view. //void divesMovedBetweenTrips(dive_trip *from, dive_trip *to, bool deleteFrom, bool createTo, const QVector &dives);