ui/map: assign the return value to last_position (#29341)

assign the return value directly to last_position
This commit is contained in:
Dean Lee
2023-08-15 07:39:43 +08:00
committed by GitHub
parent ae649ec68d
commit 613bbb7e6d

View File

@@ -43,11 +43,7 @@ MapWindow::MapWindow(const QMapboxGLSettings &settings) : m_settings(settings),
overlay_layout->addStretch(1);
overlay_layout->addWidget(map_eta);
auto last_gps_position = coordinate_from_param("LastGPSPosition");
if (last_gps_position.has_value()) {
last_position = *last_gps_position;
}
last_position = coordinate_from_param("LastGPSPosition");
grabGesture(Qt::GestureType::PinchGesture);
qDebug() << "MapWindow initialized";
}