mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Desktop: show all selected dive sites on click
When clicking a dive site on the map, the QML code would set the selected dive site, but then all dives of dive sites in the vicinity were set. But still only the clicked-on dive site was shown. Therefore, don't set the list of selected dive sites in QML, but later in DiveListView::selectDives(), where we know all the dives that were selected. This, again, gives nasty entanglement of diverse widgets and models. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b39f2406c6
commit
488eb15423
8 changed files with 38 additions and 3 deletions
|
@ -46,6 +46,11 @@ void MapWidgetHelper::centerOnDiveSite(struct dive_site *ds)
|
|||
}
|
||||
}
|
||||
|
||||
void MapWidgetHelper::setSelected(const QVector<dive_site *> &divesites)
|
||||
{
|
||||
m_mapLocationModel->setSelected(divesites);
|
||||
}
|
||||
|
||||
void MapWidgetHelper::centerOnSelectedDiveSite()
|
||||
{
|
||||
QVector<struct dive_site *> selDS = m_mapLocationModel->selectedDs();
|
||||
|
@ -115,6 +120,7 @@ void MapWidgetHelper::reloadMapLocations()
|
|||
|
||||
void MapWidgetHelper::selectionChanged()
|
||||
{
|
||||
updateEditMode();
|
||||
m_mapLocationModel->selectionChanged();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue