diff --git a/selfdrive/ui/qt/maps/map.cc b/selfdrive/ui/qt/maps/map.cc index d689674260..56c738d7d8 100644 --- a/selfdrive/ui/qt/maps/map.cc +++ b/selfdrive/ui/qt/maps/map.cc @@ -194,8 +194,7 @@ void MapWindow::updateState(const UIState &s) { if (zoom_counter == 0) { m_map->setZoom(util::map_val(velocity_filter.x(), 0, 30, MAX_ZOOM, MIN_ZOOM)); - zoom_counter = -1; - } else if (zoom_counter > 0) { + } else { zoom_counter--; } diff --git a/selfdrive/ui/qt/maps/map.h b/selfdrive/ui/qt/maps/map.h index 6bf326a3fe..cba8a4f7e3 100644 --- a/selfdrive/ui/qt/maps/map.h +++ b/selfdrive/ui/qt/maps/map.h @@ -100,7 +100,7 @@ private: // Panning QPointF m_lastPos; int pan_counter = 0; - int zoom_counter = -1; + int zoom_counter = 0; // Position std::optional last_position;