mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 02:35:38 +08:00
Crash dump related, check getMappingComponent
This commit is contained in:
@@ -94,12 +94,16 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CDbOwnModelSetFormDialog::simulatorChanged(const CSimulatorInfo &simulator)
|
void CDbOwnModelSetFormDialog::simulatorChanged(const CSimulatorInfo &simulator)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(this->getMappingComponent(), Q_FUNC_INFO, "missing mapping component");
|
|
||||||
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator");
|
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator");
|
||||||
this->setSimulator(simulator);
|
this->setSimulator(simulator);
|
||||||
this->getMappingComponent()->setOwnModelsSimulator(simulator);
|
|
||||||
this->getMappingComponent()->setOwnModelSetSimulator(simulator);
|
// if possible set in mappings component
|
||||||
this->checkData();
|
if (this->getMappingComponent())
|
||||||
|
{
|
||||||
|
this->getMappingComponent()->setOwnModelsSimulator(simulator);
|
||||||
|
this->getMappingComponent()->setOwnModelSetSimulator(simulator);
|
||||||
|
this->checkData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CDbOwnModelSetFormDialog::checkData()
|
bool CDbOwnModelSetFormDialog::checkData()
|
||||||
@@ -109,7 +113,7 @@ namespace BlackGui
|
|||||||
const int c = this->getMappingComponent()->getOwnModelsCount();
|
const int c = this->getMappingComponent()->getOwnModelsCount();
|
||||||
if (c < 1)
|
if (c < 1)
|
||||||
{
|
{
|
||||||
const CStatusMessage m = CStatusMessage(this).error("No models for %1") << m_simulatorInfo.toQString(true);
|
const CStatusMessage m = CStatusMessage(this).error("No models for '%1'") << m_simulatorInfo.toQString(true);
|
||||||
ui->form_OwnModelSet->showOverlayMessage(m);
|
ui->form_OwnModelSet->showOverlayMessage(m);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user