Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/FlightDisplay/FlyViewAdditionalActionsList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ import QtQml
QtObject {
property var guidedController

property bool anyActionAvailable: guidedController.showStartMission || guidedController.showContinueMission || guidedController.showChangeAlt ||
guidedController.showChangeLoiterRadius || guidedController.showLandAbort || guidedController.showChangeSpeed
property bool anyActionAvailable: {
for (var i = 0; i < model.length; i++) {
if (model[i].visible)
return true
}

return false
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how this ends up being re-triggered when a visible property on one of the model items changes value?


property var model: [
{
title: guidedController.startMissionTitle,
Expand Down
10 changes: 9 additions & 1 deletion src/FlightDisplay/FlyViewAdditionalCustomActionsList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Item {

property var guidedController

property bool anyActionAvailable: false
property bool anyActionAvailable: {
for (var i = 0; i < model.length; i++) {
if (model[i].visible)
return true
}

return false
}

property var model: [ ]
}
Loading