aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-02-23 22:09:34 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit9fd87fa08081116ba12812ddea0a43be61019cbb (patch)
treeeaaa75a9455bdb82a1174208d2ed352e44e91f32 /desktop-widgets
parent9ed5cf16a4a0f982f0fae170740ee2886f634a14 (diff)
downloadsubsurface-9fd87fa08081116ba12812ddea0a43be61019cbb.tar.gz
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>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/command_edit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-widgets/command_edit.cpp b/desktop-widgets/command_edit.cpp
index 106670978..a1e4de358 100644
--- a/desktop-widgets/command_edit.cpp
+++ b/desktop-widgets/command_edit.cpp
@@ -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)