diff --git a/src/FlightMap/Widgets/CenterMapDropButton.qml b/src/FlightMap/Widgets/CenterMapDropButton.qml index 8320fed2a95e5346eb94a40b0402366984d15644..e4f410ade5b19721bcb221bc1243a4e1e208a0de 100644 --- a/src/FlightMap/Widgets/CenterMapDropButton.qml +++ b/src/FlightMap/Widgets/CenterMapDropButton.qml @@ -200,11 +200,11 @@ DropButton { QGCButton { text: qsTr("Current Location") Layout.fillWidth: true - enabled: mainWindow.gcsPosition && mainWindow.gcsPosition.isValid && !followVehicleCheckBox.checked + enabled: map.gcsPosition ? map.gcsPosition.isValid && !followVehicleCheckBox.checked : false onClicked: { dropButton.hideDropDown() - map.center = mainWindow.gcsPosition + map.center = map.gcsPosition } }