mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 12:06:57 +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()
|
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
|
// SELCAL pairs in cockpit
|
||||||
this->ui->frp_ComPanelSelcalBottom->clear();
|
this->ui->frp_ComPanelSelcalBottom->clear();
|
||||||
@@ -73,12 +79,10 @@ namespace BlackGui
|
|||||||
connect(this->ui->frp_ComPanelSelcalBottom, &CSelcalCodeSelector::valueChanged, this, &CCockpitComComponent::ps_guiChangedSelcal);
|
connect(this->ui->frp_ComPanelSelcalBottom, &CSelcalCodeSelector::valueChanged, this, &CCockpitComComponent::ps_guiChangedSelcal);
|
||||||
|
|
||||||
// hook up with changes from own aircraft context
|
// 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::changedAircraftCockpit, this, &CCockpitComComponent::ps_updateCockpitFromContext);
|
||||||
this->connect(this->getIContextOwnAircraft(), &IContextOwnAircraft::changedSelcal, this, &CCockpitComComponent::ps_onChangedSelcal);
|
this->connect(this->getIContextOwnAircraft(), &IContextOwnAircraft::changedSelcal, this, &CCockpitComComponent::ps_onChangedSelcal);
|
||||||
|
|
||||||
// hook up with audio context
|
// hook up with audio context
|
||||||
Q_ASSERT(this->getIContextAudio());
|
|
||||||
this->connect(this->getIContextAudio(), &IContextAudio::changedVoiceRooms, this, &CCockpitComComponent::ps_onChangedVoiceRoomStatus);
|
this->connect(this->getIContextAudio(), &IContextAudio::changedVoiceRooms, this, &CCockpitComComponent::ps_onChangedVoiceRoomStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ namespace BlackGui
|
|||||||
// manually setting size, all other approaches failed
|
// manually setting size, all other approaches failed
|
||||||
this->window()->resize(defaultSizeShown);
|
this->window()->resize(defaultSizeShown);
|
||||||
this->m_sizeFloatingShown = this->window()->size();
|
this->m_sizeFloatingShown = this->window()->size();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user