Undo: update cylinder and weight models on paste

When pasting (or undoing paste) the cylinders or weights may change.
Send the appropriate signals and update the models accordingly.
Currently, this means copying from current dive to displayed dive,
but hopefully we can get rid of "displayed_dive" in the not so
distant future.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-02-23 22:09:34 +01:00 committed by Dirk Hohndel
parent 9ed5cf16a4
commit 9fd87fa080
8 changed files with 52 additions and 5 deletions

View file

@ -760,6 +760,10 @@ void PasteDives::undo()
emit diveListNotifier.divesChanged(trip, divesInTrip, DiveField::DIVESITE);
if (what.tags)
emit diveListNotifier.divesChanged(trip, divesInTrip, DiveField::TAGS);
if (what.cylinders)
emit diveListNotifier.cylindersReset(trip, divesInTrip);
if (what.weights)
emit diveListNotifier.weightsystemsReset(trip, divesInTrip);
});
if (diveSiteListChanged)