mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T730, initially update cockpit UI values "after some time", just to make sure the UI refelcts the context state
This commit is contained in:
committed by
Mat Sutcliffe
parent
10f696d558
commit
fc70767636
@@ -81,6 +81,14 @@ namespace BlackGui
|
||||
|
||||
// network
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::changedAtcStationsOnlineDigest, this, &CCockpitComComponent::onAtcStationsChanged, Qt::QueuedConnection);
|
||||
|
||||
QPointer<CCockpitComComponent> myself(this);
|
||||
QTimer::singleShot(10 * 1000, this, [ = ]
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown() || !myself) { return; }
|
||||
const CSimulatedAircraft aircraft = sGui->getIContextOwnAircraft()->getOwnAircraft();
|
||||
this->updateCockpitFromContext(aircraft, CIdentifier::fake());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +102,7 @@ namespace BlackGui
|
||||
|
||||
void CCockpitComComponent::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
Q_UNUSED(event)
|
||||
CStyleSheetUtility::useStyleSheetInDerivedWidget(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user