From 4cb1ceefff96121331f63e1455d233b32b3d7680 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 19 Mar 2019 22:05:52 +0100 Subject: Undo: implement undo of dive date- and time-editing This is different from the other editing commands, because date and time editing may change the order of the dive list. Therefore, this uses an already implemented dive list command. The command is extended to send a divesEdited() signal. This signal and the divesChanged() signal, which is used by the dive list, will be unified in a later commit. Update of the graphics is now not done via signals, a direct call is performed in MainTab::divesEdited(). This simplifies things. Signed-off-by: Berthold Stoeger --- desktop-widgets/command_divelist.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'desktop-widgets/command_divelist.cpp') diff --git a/desktop-widgets/command_divelist.cpp b/desktop-widgets/command_divelist.cpp index 8da0fab46..a901822f9 100644 --- a/desktop-widgets/command_divelist.cpp +++ b/desktop-widgets/command_divelist.cpp @@ -746,6 +746,7 @@ void ShiftTime::redoit() sort_dive_table(&trip->dives); // Keep the trip-table in order emit diveListNotifier.divesTimeChanged(trip, timeChanged, divesInTrip); }); + emit diveListNotifier.divesEdited(diveList, DiveField::DATETIME); // Negate the time-shift so that the next call does the reverse timeChanged = -timeChanged; -- cgit v1.2.3-70-g09d2