nav ui: restore speed-adaptive map zoom level (#28796)

Revert "map: fix repeated call to m_map->setZoom (#25784)"

This reverts commit 00cc1831bb13d838ba5df4fdfc6c071f7c704493.
old-commit-hash: e816c81a5af8684cf3eb6f0c9d578cf82ebc1588
This commit is contained in:
Jason Young
2023-07-05 18:45:32 -04:00
committed by GitHub
parent b987242655
commit 089a09a92a
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -194,8 +194,7 @@ void MapWindow::updateState(const UIState &s) {
if (zoom_counter == 0) {
m_map->setZoom(util::map_val<float>(velocity_filter.x(), 0, 30, MAX_ZOOM, MIN_ZOOM));
zoom_counter = -1;
} else if (zoom_counter > 0) {
} else {
zoom_counter--;
}
+1 -1
View File
@@ -100,7 +100,7 @@ private:
// Panning
QPointF m_lastPos;
int pan_counter = 0;
int zoom_counter = -1;
int zoom_counter = 0;
// Position
std::optional<QMapbox::Coordinate> last_position;