undo: add a general dives-imported signal

Add a general dives-imported signal for those cases where we
want to fully rebuild models, notably, the completion models.
The divesAdded signals are too fine, because they are sent
per trip and we don't want to reload these models multiple
times per import.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-11-14 16:59:35 +01:00 committed by Dirk Hohndel
parent 67d956b44c
commit 52d5125926
2 changed files with 3 additions and 0 deletions

View file

@ -565,6 +565,8 @@ void ImportDives::redoit()
emit diveListNotifier.filterPresetAdded(filterPresetsToRemove.back());
}
filterPresetsToAdd.clear();
emit diveListNotifier.divesImported();
}
void ImportDives::undoit()

View file

@ -91,6 +91,7 @@ signals:
void divesMovedBetweenTrips(dive_trip *from, dive_trip *to, bool deleteFrom, bool createTo, const QVector<dive *> &dives);
void divesChanged(const QVector<dive *> &dives, DiveField field);
void divesTimeChanged(timestamp_t delta, const QVector<dive *> &dives);
void divesImported(); // A general signal when multiple dives have been imported.
void cylindersReset(const QVector<dive *> &dives);
void cylinderAdded(dive *d, int pos);