mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 19:12:07 +08:00
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:
@@ -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--;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user