From 069bfb921f2fd96f8dbe9f22a022166737a8dcae Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Mon, 11 Dec 2017 14:45:03 +0100 Subject: [PATCH] Prevent sending the flightplan only if there are validation errors or warnings Summary: The flight plan initialization always contains messages. In case everything was fine, it contains the info validation messages, that validation passed. So messages is never empty and the flight plan was never sent out. Instead, it should stop sending the flight plan if there were validation errors or warnings. Reviewers: #swift_pilot_client, kbasan Reviewed By: #swift_pilot_client, kbasan Subscribers: jenkins Maniphest Tasks: T206 Differential Revision: https://dev.swift-project.org/D71 --- src/blackgui/components/flightplancomponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blackgui/components/flightplancomponent.cpp b/src/blackgui/components/flightplancomponent.cpp index 20032ce5f..348c1d631 100644 --- a/src/blackgui/components/flightplancomponent.cpp +++ b/src/blackgui/components/flightplancomponent.cpp @@ -361,7 +361,7 @@ namespace BlackGui { CFlightPlan flightPlan; CStatusMessageList messages = this->validateAndInitializeFlightPlan(flightPlan); - if (messages.isEmpty()) + if (!messages.hasWarningOrErrorMessages()) { // no error, send if possible if (sGui->getIContextNetwork()->isConnected())