From 6c1fb389ff0de016c0e4bea18a736b07465f14dc Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Thu, 2 Aug 2018 11:55:02 -0400 Subject: [PATCH] Reset "relevant" features when a flight is created. --- src/Airmap/AirMapFlightPlanManager.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Airmap/AirMapFlightPlanManager.cc b/src/Airmap/AirMapFlightPlanManager.cc index be97e05b0..01d03a6e3 100644 --- a/src/Airmap/AirMapFlightPlanManager.cc +++ b/src/Airmap/AirMapFlightPlanManager.cc @@ -502,6 +502,8 @@ AirMapFlightPlanManager::_uploadFlightPlan() QTimer::singleShot(100, this, &AirMapFlightPlanManager::_uploadFlightPlan); return; } + //-- Reset "relevant" features + _importantFeatures.clear(); _state = State::FlightUpload; std::weak_ptr isAlive(_instance); _shared.doRequestWithLogin([this, isAlive](const QString& login_token) { @@ -718,6 +720,8 @@ AirMapFlightPlanManager::_pollBriefing() } } } + //-- When a flight is first created, we send no features. That means that all "missing_info" are "relevant" features. + // We keep a list of them so they will be always shown to the user even when they are no longer "missing_info" for(const auto& feature : _importantFeatures) { if(!_findBriefFeature(feature->name())) { _briefFeatures.append(feature); -- 2.22.0