[Weather] Allow to trigger reload of weather from UI

This commit is contained in:
Klaus Basan
2020-05-19 01:13:35 +02:00
committed by Mat Sutcliffe
parent c2ecf167b7
commit 24bc57ac32
4 changed files with 58 additions and 19 deletions

View File

@@ -77,7 +77,6 @@ namespace BlackCore
m_plugins->collectPlugins();
this->restoreSimulatorPlugins();
connect(&m_weatherManager, &CWeatherManager::weatherGridReceived, this, &CContextSimulator::weatherGridReceived, Qt::QueuedConnection);
connect(&m_weatherManager, &CWeatherManager::weatherGridReceived, this, &CContextSimulator::onWeatherGridReceived, Qt::QueuedConnection);
connect(&m_aircraftMatcher, &CAircraftMatcher::setupChanged, this, &CContextSimulator::matchingSetupChanged);
connect(&CCentralMultiSimulatorModelSetCachesProvider::modelCachesInstance(), &CCentralMultiSimulatorModelSetCachesProvider::cacheChanged, this, &CContextSimulator::modelSetChanged);
@@ -882,6 +881,9 @@ namespace BlackCore
void CContextSimulator::onWeatherGridReceived(const CWeatherGrid &weatherGrid, const CIdentifier &identifier)
{
if (!sApp || sApp->isShuttingDown()) { return; }
emit this->weatherGridReceived(weatherGrid, identifier);
if (!this->isSimulatorPluginAvailable()) { return; }
if (!m_simulatorPlugin.second) { return; }