Write info about the weather into the crashinfo file

This commit is contained in:
Klaus Basan
2019-04-22 16:57:14 +02:00
parent 599064fe6c
commit 22f140a494

View File

@@ -144,13 +144,18 @@ namespace BlackCore
void ISimulator::reloadWeatherSettings() void ISimulator::reloadWeatherSettings()
{ {
// log crash info about weather
if (sApp && !sApp->isShuttingDown()) { sApp->crashAndLogAppendInfo(u"Simulator weather: " % boolToYesNo(m_isWeatherActivated)); }
if (!m_isWeatherActivated) { return; } if (!m_isWeatherActivated) { return; }
const auto selectedWeatherScenario = m_weatherScenarioSettings.get(); const CWeatherScenario selectedWeatherScenario = m_weatherScenarioSettings.get();
if (!CWeatherScenario::isRealWeatherScenario(selectedWeatherScenario)) if (!CWeatherScenario::isRealWeatherScenario(selectedWeatherScenario))
{ {
m_lastWeatherPosition = {}; m_lastWeatherPosition = {};
this->injectWeatherGrid(CWeatherGrid::getByScenario(selectedWeatherScenario)); this->injectWeatherGrid(CWeatherGrid::getByScenario(selectedWeatherScenario));
} }
// log crash info about weather
if (sApp && !sApp->isShuttingDown()) { sApp->crashAndLogAppendInfo(selectedWeatherScenario.toQString(true)); }
} }
void ISimulator::clearAllRemoteAircraftData() void ISimulator::clearAllRemoteAircraftData()