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
This commit is contained in:
Roland Winklmeier
2017-12-11 14:45:03 +01:00
parent b952c60f04
commit 069bfb921f

View File

@@ -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())