From 22f140a4948dccddfdc2ad066e16658821d1ec7b Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 22 Apr 2019 16:57:14 +0200 Subject: [PATCH] Write info about the weather into the crashinfo file --- src/blackcore/simulator.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/blackcore/simulator.cpp b/src/blackcore/simulator.cpp index 4050f6d1d..fc8e7380d 100644 --- a/src/blackcore/simulator.cpp +++ b/src/blackcore/simulator.cpp @@ -144,13 +144,18 @@ namespace BlackCore void ISimulator::reloadWeatherSettings() { + // log crash info about weather + if (sApp && !sApp->isShuttingDown()) { sApp->crashAndLogAppendInfo(u"Simulator weather: " % boolToYesNo(m_isWeatherActivated)); } if (!m_isWeatherActivated) { return; } - const auto selectedWeatherScenario = m_weatherScenarioSettings.get(); + const CWeatherScenario selectedWeatherScenario = m_weatherScenarioSettings.get(); if (!CWeatherScenario::isRealWeatherScenario(selectedWeatherScenario)) { m_lastWeatherPosition = {}; this->injectWeatherGrid(CWeatherGrid::getByScenario(selectedWeatherScenario)); } + + // log crash info about weather + if (sApp && !sApp->isShuttingDown()) { sApp->crashAndLogAppendInfo(selectedWeatherScenario.toQString(true)); } } void ISimulator::clearAllRemoteAircraftData() @@ -1073,8 +1078,8 @@ namespace BlackCore if (s.tsCurrent > 0) { dm = u"Setup: " % s.usedSetup.toQString(true) % - u"\n\n" % - u"Situation: " % s.toQString(false, true, true, true, true, sep); + u"\n\n" % + u"Situation: " % s.toQString(false, true, true, true, true, sep); } if (p.tsCurrent > 0) { dm += (dm.isEmpty() ? u"Parts: " : u"\n\nParts: ") % p.toQString(sep); } return dm;