Commit 4a637d90 authored by Jacob Dahl's avatar Jacob Dahl

added function to FlightView to show the checklist if switching views from a...

added function to FlightView to show the checklist if switching views from a view other than FlightView and if checklist should be shown
parent 4fdc5f5f
...@@ -70,12 +70,6 @@ Item { ...@@ -70,12 +70,6 @@ Item {
readonly property string _mainIsMapKey: "MainFlyWindowIsMap" readonly property string _mainIsMapKey: "MainFlyWindowIsMap"
readonly property string _PIPVisibleKey: "IsPIPVisible" readonly property string _PIPVisibleKey: "IsPIPVisible"
onVisibleChanged: {
if (activeVehicle && !_checklistComplete && _enforceChecklist) {
checklistPopupTimer.restart()
}
}
Timer { Timer {
id: checklistPopupTimer id: checklistPopupTimer
interval: 1000 interval: 1000
...@@ -122,6 +116,12 @@ Item { ...@@ -122,6 +116,12 @@ Item {
return true; return true;
} }
function showPreflightChecklistIfNeeded () {
if (activeVehicle && !_checklistComplete && _enforceChecklist) {
checklistPopupTimer.restart()
}
}
Connections { Connections {
target: _missionController target: _missionController
onResumeMissionUploadFail: guidedActionsController.confirmAction(guidedActionsController.actionResumeMissionUploadFail) onResumeMissionUploadFail: guidedActionsController.confirmAction(guidedActionsController.actionResumeMissionUploadFail)
......
...@@ -113,6 +113,10 @@ ApplicationWindow { ...@@ -113,6 +113,10 @@ ApplicationWindow {
} }
function showFlyView() { function showFlyView() {
if (!flightView.visible) {
flightView.showPreflightChecklistIfNeeded()
}
viewSwitch(false) viewSwitch(false)
flightView.visible = true flightView.visible = true
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment