diff --git a/src/PlanView/SurveyItemEditor.qml b/src/PlanView/SurveyItemEditor.qml index ffb4fd7d8980c52bc4e621a0b5c2335c875cae71..699c7253c720893cf77e5147bc55794dd7093c8c 100644 --- a/src/PlanView/SurveyItemEditor.qml +++ b/src/PlanView/SurveyItemEditor.qml @@ -91,10 +91,10 @@ Rectangle { if (index == _indexCustom) { missionItem.clearCurrentPreset() } else if (index == _indexCreate) { - rootQgcView.showDialog(savePresetDialog, qsTr("Save Preset"), rootQgcView.showDialogDefaultWidth, StandardButton.Save | StandardButton.Cancel) + mainWindow.showDialog(savePresetDialog, qsTr("Save Preset"), mainWindow.showDialogDefaultWidth, StandardButton.Save | StandardButton.Cancel) } else if (index == _indexDelete) { if (missionItem.builtInPreset) { - rootQgcView.showMessage(qsTr("Delete Preset"), qsTr("This preset cannot be deleted."), StandardButton.Ok) + mainWindow.showMessage(qsTr("Delete Preset"), qsTr("This preset cannot be deleted."), StandardButton.Ok) } else { missionItem.deleteCurrentPreset() } @@ -262,7 +262,7 @@ Rectangle { FactCheckBox { text: qsTr("Fly alternate transects") fact: missionItem.flyAlternateTransects - visible: _vehicle.fixedWing || _vehicle.vtol + visible: _vehicle ? (_vehicle.fixedWing || _vehicle.vtol) : false } QGCCheckBox {