From 82c47bdd794c05e51c73afda14b8bfc95f6694e1 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 23 Dec 2018 23:45:12 +0100 Subject: Undo: make dive-import undoable On desktop, replace all add_imported_dives() calls by a new undo-command. This was rather straight forward, as all the preparation work was done in previous commits. By using an undo-command, a full UI-reset can be avoided, making the UI react smoother. Signed-off-by: Berthold Stoeger --- desktop-widgets/command.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'desktop-widgets/command.h') diff --git a/desktop-widgets/command.h b/desktop-widgets/command.h index 71ef2f9da..83bde3b3a 100644 --- a/desktop-widgets/command.h +++ b/desktop-widgets/command.h @@ -21,6 +21,9 @@ void addDive(dive *d, bool autogroup, bool newNumber); // If d->dive_trip is nul // distance are added to a trip. dive d is consumed (the structure is reset)! // If newNumber is true, the dive is assigned a new number, depending on the // insertion position. +void importDives(struct dive_table *dives, struct trip_table *trips, + bool prefer_imported, bool downloaded, bool merge_all_trips, + const QString &source); void deleteDive(const QVector &divesToDelete); void shiftTime(const QVector &changedDives, int amount); void renumberDives(const QVector> &divesToRenumber); -- cgit v1.2.3-70-g09d2