mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
[AFV] Ref T731, update UI if audio AFV client changes status
This commit is contained in:
@@ -75,7 +75,7 @@ namespace BlackGui
|
||||
// it takes a moment until the settings are sychronized
|
||||
// this is leading to undesired "save settings" messages and played sounds
|
||||
QPointer<CAudioDeviceVolumeSetupComponent> myself(this);
|
||||
QTimer::singleShot(1000, this, [ = ]
|
||||
QTimer::singleShot(2000, this, [ = ]
|
||||
{
|
||||
if (!myself || !sGui || sGui->isShuttingDown()) { return; }
|
||||
this->init();
|
||||
@@ -136,7 +136,15 @@ namespace BlackGui
|
||||
c = connect(sGui->getCContextAudioBase()->afvClient(), &CAfvClient::updatedFromOwnAircraftCockpit, this, &CAudioDeviceVolumeSetupComponent::onUpdatedClientWithCockpitData, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
|
||||
this->onUpdatedClientWithCockpitData();
|
||||
QPointer<CAudioDeviceVolumeSetupComponent> myself(this);
|
||||
c = connect(sGui->getCContextAudioBase()->afvClient(), &CAfvClient::connectionStatusChanged, this, [ = ]
|
||||
{
|
||||
if (!myself || !sGui || sGui->isShuttingDown()) { return; }
|
||||
myself->setTransmitReceiveInUiFromVoiceClient();
|
||||
}, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
|
||||
this->setTransmitReceiveInUiFromVoiceClient();
|
||||
}
|
||||
Q_UNUSED(c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user