mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Ref T630, avoid invalid simulator for new set
This commit is contained in:
@@ -362,8 +362,15 @@ namespace BlackGui
|
|||||||
void CDbOwnModelSetComponent::createNewSet()
|
void CDbOwnModelSetComponent::createNewSet()
|
||||||
{
|
{
|
||||||
// make sure both tabs display the same simulator
|
// make sure both tabs display the same simulator
|
||||||
// since we use the componet also in the launcher wizard, mc might not be existing
|
// since we use the component also in the launcher wizard, mc might not be existing
|
||||||
const CSimulatorInfo simulator(this->getModelSetSimulator());
|
const CSimulatorInfo simulator(this->getModelSetSimulator());
|
||||||
|
if (!simulator.isSingleSimulator())
|
||||||
|
{
|
||||||
|
// Ref T630, avoid invalid simulator
|
||||||
|
CLogMessage(this).error(u"No single simulator!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CDbMappingComponent *mc = this->getMappingComponent();
|
CDbMappingComponent *mc = this->getMappingComponent();
|
||||||
if (!mc)
|
if (!mc)
|
||||||
{
|
{
|
||||||
@@ -434,7 +441,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CDbOwnModelSetComponent::triggerSetSimulatorDeferred(const CSimulatorInfo &simulator)
|
void CDbOwnModelSetComponent::triggerSetSimulatorDeferred(const CSimulatorInfo &simulator)
|
||||||
{
|
{
|
||||||
this->admitCache(simulator);
|
this->admitCache(simulator); // trigger loading
|
||||||
|
|
||||||
QPointer<CDbOwnModelSetComponent> myself(this);
|
QPointer<CDbOwnModelSetComponent> myself(this);
|
||||||
QTimer::singleShot(1000, this, [ = ]
|
QTimer::singleShot(1000, this, [ = ]
|
||||||
|
|||||||
Reference in New Issue
Block a user