mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user