From 317ee2f1049b7d4e859162c4c60bd1ebd3eaf8cb Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 3 Feb 2020 23:04:23 +0100 Subject: [PATCH] Dive site: inform map of selection in DiveFilter::setFilterDiveSite When starting / changing the dive-site filter, inform the map of the changed dive site selection by calling MapWidget::instance()->selectionChanged(); This fixes a bug, where on clicking dive sites in the dive site tab the dive sites from the *previous* click were highlighted. Perhaps the selectionChanged() call should be put into the setSelected() call. But the data flow between the different parts of the dive-site and map code are so convoluted that I don't want to risk anything! Signed-off-by: Berthold Stoeger --- core/divefilter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/divefilter.cpp b/core/divefilter.cpp index bf9ce1046..595b5136c 100644 --- a/core/divefilter.cpp +++ b/core/divefilter.cpp @@ -217,6 +217,7 @@ void DiveFilter::setFilterDiveSite(QVector ds) emit diveListNotifier.filterReset(); MapWidget::instance()->setSelected(dive_sites); + MapWidget::instance()->selectionChanged(); MainWindow::instance()->diveList->expandAll(); }