aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-03 23:04:23 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-04 02:17:36 +0100
commit317ee2f1049b7d4e859162c4c60bd1ebd3eaf8cb (patch)
tree64447103f2e3c63a63a7214ef377a62400156cee /core
parent9ed886e4bea6c88a427a8fce50e2cb226d24afcc (diff)
downloadsubsurface-317ee2f1049b7d4e859162c4c60bd1ebd3eaf8cb.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/divefilter.cpp1
1 files changed, 1 insertions, 0 deletions
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<dive_site *> ds)
emit diveListNotifier.filterReset();
MapWidget::instance()->setSelected(dive_sites);
+ MapWidget::instance()->selectionChanged();
MainWindow::instance()->diveList->expandAll();
}