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>
This commit is contained in:
Berthold Stoeger 2020-02-03 23:04:23 +01:00 committed by Dirk Hohndel
parent 9ed886e4be
commit 317ee2f104

View file

@ -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();
}