From 264994f9234bb1665248969967ac595e21bb80c9 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Thu, 13 Feb 2020 15:42:55 -0700 Subject: [PATCH] removed dropPanel.close(). Fixed logic for displaying checklist (passed) --- src/FlightDisplay/PreFlightCheckList.qml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/FlightDisplay/PreFlightCheckList.qml b/src/FlightDisplay/PreFlightCheckList.qml index 495723505..5acebb0b9 100644 --- a/src/FlightDisplay/PreFlightCheckList.qml +++ b/src/FlightDisplay/PreFlightCheckList.qml @@ -42,14 +42,18 @@ Rectangle { group = checkListRepeater.itemAt(index + 1) group.enabled = 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) -- 2.22.0