From f57dd8d9dd514eeb2a54f5bab6cc78898279cb4e Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 21 Apr 2019 00:49:59 +0200 Subject: [PATCH] Ref T630, avoid invalid simulator for new set --- src/blackgui/components/dbownmodelsetcomponent.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/blackgui/components/dbownmodelsetcomponent.cpp b/src/blackgui/components/dbownmodelsetcomponent.cpp index d0724cfa9..3fadf489c 100644 --- a/src/blackgui/components/dbownmodelsetcomponent.cpp +++ b/src/blackgui/components/dbownmodelsetcomponent.cpp @@ -362,8 +362,15 @@ namespace BlackGui void CDbOwnModelSetComponent::createNewSet() { // 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()); + if (!simulator.isSingleSimulator()) + { + // Ref T630, avoid invalid simulator + CLogMessage(this).error(u"No single simulator!"); + return; + } + CDbMappingComponent *mc = this->getMappingComponent(); if (!mc) { @@ -434,7 +441,7 @@ namespace BlackGui void CDbOwnModelSetComponent::triggerSetSimulatorDeferred(const CSimulatorInfo &simulator) { - this->admitCache(simulator); + this->admitCache(simulator); // trigger loading QPointer myself(this); QTimer::singleShot(1000, this, [ = ]