From 8858bfa1f8cf30cc4eb070fb6e709f7051e61241 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 19 Mar 2019 19:52:54 +0100 Subject: Dive site: implement purge of unused dive sites Add a "purge unused dive sites" button to the dive site list. Connect it to a new PurgeUnusedDiveSites command. Implementation was trivial: simply copy the DeleteDiveSites command. Signed-off-by: Berthold Stoeger --- desktop-widgets/tab-widgets/TabDiveSite.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'desktop-widgets/tab-widgets/TabDiveSite.cpp') diff --git a/desktop-widgets/tab-widgets/TabDiveSite.cpp b/desktop-widgets/tab-widgets/TabDiveSite.cpp index f021f73dc..dc0b6be67 100644 --- a/desktop-widgets/tab-widgets/TabDiveSite.cpp +++ b/desktop-widgets/tab-widgets/TabDiveSite.cpp @@ -69,3 +69,8 @@ void TabDiveSite::diveSiteChanged(struct dive_site *ds, int field) QModelIndex localIdx = model.mapFromSource(globalIdx); ui.diveSites->view()->scrollTo(localIdx); } + +void TabDiveSite::on_purgeUnused_clicked() +{ + Command::purgeUnusedDiveSites(); +} -- cgit v1.2.3-70-g09d2