mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-20 20:32:06 +08:00
map: set destination marker visibility once (#29444)
set visibility once
This commit is contained in:
@@ -377,8 +377,6 @@ void MapWindow::offroadTransition(bool offroad) {
|
||||
}
|
||||
|
||||
void MapWindow::updateDestinationMarker() {
|
||||
m_map->setPaintProperty("pinLayer", "visibility", "none");
|
||||
|
||||
auto nav_dest = coordinate_from_param("NavDestination");
|
||||
if (nav_dest.has_value()) {
|
||||
auto point = coordinate_to_collection(*nav_dest);
|
||||
@@ -388,5 +386,7 @@ void MapWindow::updateDestinationMarker() {
|
||||
pinSource["data"] = QVariant::fromValue<QMapbox::Feature>(feature);
|
||||
m_map->updateSource("pinSource", pinSource);
|
||||
m_map->setPaintProperty("pinLayer", "visibility", "visible");
|
||||
} else {
|
||||
m_map->setPaintProperty("pinLayer", "visibility", "none");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user