mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Map: reload on selection change directly
When changing the dive selection, we have to reload the map to show the correctly highlighted flags. Do this directly by hooking into the DiveListNotifier::divesChanged signal instead of indirectly via the MainTab. Moreover, on reload center on the highlighted dive sites. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
48b8129137
commit
d4a91a52fa
5 changed files with 12 additions and 12 deletions
|
@ -310,11 +310,6 @@ void MainTab::divesChanged(dive_trip *trip, const QVector<dive *> &dives, DiveFi
|
|||
break;
|
||||
case DiveField::DIVESITE:
|
||||
updateDiveSite(current_dive);
|
||||
// Since we only show dive sites with a dive, a new dive site may have appeared or an old one disappeared.
|
||||
// Therefore reload the map widget.
|
||||
// TODO: Call this only if a site *actually* went from usage count 0 to 1 or 1 to 0.
|
||||
MapWidget::instance()->repopulateLabels();
|
||||
emit diveSiteChanged();
|
||||
break;
|
||||
case DiveField::TAGS:
|
||||
ui.tagWidget->setText(get_taglist_string(current_dive->tag_list));
|
||||
|
@ -593,7 +588,6 @@ void MainTab::updateDiveInfo()
|
|||
|
||||
if (verbose && current_dive && current_dive->dive_site)
|
||||
qDebug() << "Set the current dive site:" << current_dive->dive_site->uuid;
|
||||
emit diveSiteChanged();
|
||||
}
|
||||
|
||||
void MainTab::reload()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue