mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refs #366 cleanup
* Removed obsolete signal from IContextSimulator * Removed connectToSimulator() method from IContextSimulator as it is no longer relevant * CSimulatorComponent updates automatically when simulator disconnects * FS9 & FSX drivers update (including FSCommon)
This commit is contained in:
committed by
Roland Winklmeier
parent
63e48ae332
commit
4d4acb20bc
@@ -62,13 +62,22 @@ namespace BlackGui
|
||||
|
||||
void CSimulatorComponent::update()
|
||||
{
|
||||
Q_ASSERT(getIContextSimulator());
|
||||
|
||||
if (!this->isVisibleWidget()) return; // no updates on invisible widgets
|
||||
if (!this->getIContextOwnAircraft()) return;
|
||||
if (!this->getIContextSimulator()->isSimulating())
|
||||
{
|
||||
if (this->rowCount() == 1) { return; }
|
||||
this->clear();
|
||||
this->addOrUpdateByName("info", "sim not running", CIcons::StandardIconWarning16);
|
||||
|
||||
if (!this->getIContextSimulator()->isConnected()) {
|
||||
addOrUpdateByName("info", tr("No simulator available"), CIcons::StandardIconWarning16);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this->getIContextSimulator()->isSimulating()) {
|
||||
this->addOrUpdateByName("info",
|
||||
tr("Simulator (%1) not yet running").arg(
|
||||
getIContextSimulator()->getSimulatorInfo().getSimulator()
|
||||
),
|
||||
CIcons::StandardIconWarning16);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,6 +127,8 @@ namespace BlackGui
|
||||
this->m_updateTimer->startTimer(intervalMs);
|
||||
} else {
|
||||
this->stopTimer();
|
||||
clear();
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user