From 9fd87fa08081116ba12812ddea0a43be61019cbb Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 23 Feb 2019 22:09:34 +0100 Subject: 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 --- desktop-widgets/command_edit.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'desktop-widgets/command_edit.cpp') 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) -- cgit v1.2.3-70-g09d2