mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Init COM values from ownAircraft context
This commit is contained in:
committed by
Roland Winklmeier
parent
a07ecfb49b
commit
cd2c7c12a7
@@ -56,6 +56,12 @@ namespace BlackGui
|
||||
|
||||
void CCockpitComComponent::runtimeHasBeenSet()
|
||||
{
|
||||
Q_ASSERT(this->getIContextOwnAircraft());
|
||||
Q_ASSERT(this->getIContextAudio());
|
||||
|
||||
// init from aircraft
|
||||
CAircraft ownAircraft = this->getOwnAircraft();
|
||||
this->ps_updateCockpitFromContext(ownAircraft, "dummyInitialValues");
|
||||
|
||||
// SELCAL pairs in cockpit
|
||||
this->ui->frp_ComPanelSelcalBottom->clear();
|
||||
@@ -73,12 +79,10 @@ namespace BlackGui
|
||||
connect(this->ui->frp_ComPanelSelcalBottom, &CSelcalCodeSelector::valueChanged, this, &CCockpitComComponent::ps_guiChangedSelcal);
|
||||
|
||||
// hook up with changes from own aircraft context
|
||||
Q_ASSERT(this->getIContextOwnAircraft());
|
||||
this->connect(this->getIContextOwnAircraft(), &IContextOwnAircraft::changedAircraftCockpit, this, &CCockpitComComponent::ps_updateCockpitFromContext);
|
||||
this->connect(this->getIContextOwnAircraft(), &IContextOwnAircraft::changedSelcal, this, &CCockpitComComponent::ps_onChangedSelcal);
|
||||
|
||||
// hook up with audio context
|
||||
Q_ASSERT(this->getIContextAudio());
|
||||
this->connect(this->getIContextAudio(), &IContextAudio::changedVoiceRooms, this, &CCockpitComComponent::ps_onChangedVoiceRoomStatus);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,6 @@ namespace BlackGui
|
||||
// manually setting size, all other approaches failed
|
||||
this->window()->resize(defaultSizeShown);
|
||||
this->m_sizeFloatingShown = this->window()->size();
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user