diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index 76ac0452804c2f28ead5639f5ef3f9b35fe8d08a..5024a158245a32fd64f7d003b90edcec185739d2 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -570,8 +570,8 @@ Item { z: _mapAndVideo.z + 4 title: qsTr("Fly") maxHeight: (_flightVideo.visible ? _flightVideo.y : parent.height) - toolStrip.y - buttonVisible: [ _useChecklist, _guidedController.showTakeoff || !_guidedController.showLand, _guidedController.showLand && !_guidedController.showTakeoff, true, true, true ] - buttonEnabled: [ _useChecklist && activeVehicle, _guidedController.showTakeoff, _guidedController.showLand, _guidedController.showRTL, _guidedController.showPause, _anyActionAvailable ] + buttonVisible: [true, _useChecklist, _guidedController.showTakeoff || !_guidedController.showLand, _guidedController.showLand && !_guidedController.showTakeoff, true, true, true ] + buttonEnabled: [true, _useChecklist && activeVehicle, _guidedController.showTakeoff, _guidedController.showLand, _guidedController.showRTL, _guidedController.showPause, _anyActionAvailable ] property bool _anyActionAvailable: _guidedController.showStartMission || _guidedController.showResumeMission || _guidedController.showChangeAlt || _guidedController.showLandAbort property var _actionModel: [ @@ -608,6 +608,10 @@ Item { ] model: [ + { + name: "Plan", + iconSource: "/qmlimages/Plan.svg", + }, { name: "Checklist", iconSource: "/qmlimages/check.svg", @@ -642,13 +646,18 @@ Item { onClicked: { guidedActionsController.closeAll() - var action = model[index].action - if (action === -1) { - guidedActionList.model = _actionModel - guidedActionList.visible = true + if(index === 0) { + mainWindow.showPlanView() } else { - _guidedController.confirmAction(action) + var action = model[index].action + if (action === -1) { + guidedActionList.model = _actionModel + guidedActionList.visible = true + } else { + _guidedController.confirmAction(action) + } } + } } diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index cff0d776f9be04b8eb01eb7dc83089a9aeca5b2f..e834deef7b4cc2426c05908bd057dc73abaa4421 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -551,16 +551,20 @@ Item { color: qgcPal.window title: qsTr("Plan") z: QGroundControl.zOrderWidgets - showAlternateIcon: [ _planMasterController.dirty, false, false, false, false, false, false ] - rotateImage: [ _planMasterController.syncInProgress, false, false, false, false, false, false ] - animateImage: [ _planMasterController.dirty, false, false, false, false, false, false ] - buttonEnabled: [ !_planMasterController.syncInProgress, true, true, true, true, true, true ] - buttonVisible: [ true, true, _waypointsOnlyMode, true, true, _showZoom, _showZoom ] + showAlternateIcon: [ false, _planMasterController.dirty, false, false, false, false, false, false ] + rotateImage: [ false, _planMasterController.syncInProgress, false, false, false, false, false, false ] + animateImage: [ false, _planMasterController.dirty, false, false, false, false, false, false ] + buttonEnabled: [ true, !_planMasterController.syncInProgress, true, true, true, true, true, true ] + buttonVisible: [ true, true, true, _waypointsOnlyMode, true, true, _showZoom, _showZoom ] maxHeight: mapScale.y - toolStrip.y property bool _showZoom: !ScreenTools.isMobile model: [ + { + name: qsTr("Fly"), + iconSource: "/qmlimages/PaperPlane.svg", + }, { name: qsTr("File"), iconSource: "/qmlimages/MapSync.svg", @@ -599,29 +603,33 @@ Item { onClicked: { switch (index) { - case 1: + case 0: + mainWindow.showFlyView() + break; + case 2: _addWaypointOnClick = checked - _addROIOnClick = false + _addROIOnClick = false break - case 2: - _addROIOnClick = checked + case 3: + _addROIOnClick = checked _addWaypointOnClick = false break - case 3: + case 4: if (_singleComplexItem) { addComplexItem(_missionController.complexMissionItemNames[0]) } break - case 5: + case 6: editorMap.zoomLevel += 0.5 break - case 6: + case 7: editorMap.zoomLevel -= 0.5 break } } } } + //----------------------------------------------------------- // Right pane for mission editing controls Rectangle {