Browse Source

removed dropPanel.close(). Fixed logic for displaying checklist (passed)

QGC4.4
Jacob Dahl 5 years ago
parent
commit
264994f923
  1. 16
      src/FlightDisplay/PreFlightCheckList.qml

16
src/FlightDisplay/PreFlightCheckList.qml

@ -42,14 +42,18 @@ Rectangle {
group = checkListRepeater.itemAt(index + 1) group = checkListRepeater.itemAt(index + 1)
group.enabled = true group.enabled = true
group._checked = true group._checked = true
} else if ((index + 1) == checkListRepeater.count) {
// If the last group is passed, we mark the entire checklist as passed.
_passed = true
checklistDropPanel.close()
} }
} else {
_passed = false
} }
// Walk the list and check if any group is failing
var allPassed = true
for (var i=0; i < checkListRepeater.count; i++) {
if (!checkListRepeater.itemAt(i).passed) {
allPassed = false
break
}
}
_passed = allPassed;
} }
//-- Pick a checklist model that matches the current airframe type (if any) //-- Pick a checklist model that matches the current airframe type (if any)

Loading…
Cancel
Save