cleanup: extend MAP_SUPPORT block

When there is no map support, selection of dive sites is suppressed.
There is no point in calculating the selected dive sites in this case.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-08-28 11:17:12 +02:00 committed by Dirk Hohndel
parent 5be01b04ed
commit 7e9043a4ac

View file

@ -505,6 +505,7 @@ void DiveListView::selectAll()
void DiveListView::selectionChangeDone()
{
#ifdef MAP_SUPPORT
// When receiving the divesSelected signal the main window will
// instruct the map to update the flags. Thus, make sure that
// the selected maps are registered correctly.
@ -523,10 +524,9 @@ void DiveListView::selectionChangeDone()
if (d->selected && !d->hidden_by_filter && d->dive_site && !selectedSites.contains(d->dive_site))
selectedSites.push_back(d->dive_site);
}
#ifdef MAP_SUPPORT
MapWidget::instance()->setSelected(selectedSites);
#endif
}
#endif
emit divesSelected();
}