summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command_divelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/command_divelist.cpp')
-rw-r--r--desktop-widgets/command_divelist.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop-widgets/command_divelist.cpp b/desktop-widgets/command_divelist.cpp
index 59dec85c3..8da0fab46 100644
--- a/desktop-widgets/command_divelist.cpp
+++ b/desktop-widgets/command_divelist.cpp
@@ -133,8 +133,9 @@ DivesAndTripsToAdd DiveListBase::removeDives(DivesAndSitesToRemove &divesAndSite
divesAndSitesToDelete.dives.clear();
for (dive_site *ds: divesAndSitesToDelete.sites) {
- unregister_dive_site(ds);
+ int idx = unregister_dive_site(ds);
sitesToAdd.emplace_back(ds);
+ emit diveListNotifier.diveSiteDeleted(ds, idx);
}
divesAndSitesToDelete.sites.clear();
@@ -188,7 +189,8 @@ DivesAndSitesToRemove DiveListBase::addDives(DivesAndTripsToAdd &toAdd)
// Finally, add any necessary dive sites
for (OwningDiveSitePtr &ds: toAdd.sites) {
sites.push_back(ds.get());
- register_dive_site(ds.release()); // Return ownership to backend
+ int idx = register_dive_site(ds.release()); // Return ownership to backend
+ emit diveListNotifier.diveSiteAdded(sites.back(), idx);
}
toAdd.sites.clear();