From e3fd8d2c787bbcf285e35f1c049588578d07e937 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 31 May 2016 23:46:29 +0200 Subject: [PATCH] refs #649, default values for selectors based on own model set --- src/blackgui/components/dbownmodelsetcomponent.cpp | 2 ++ src/blackgui/components/modelmatchercomponent.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/blackgui/components/dbownmodelsetcomponent.cpp b/src/blackgui/components/dbownmodelsetcomponent.cpp index c664bf008..b232b59fa 100644 --- a/src/blackgui/components/dbownmodelsetcomponent.cpp +++ b/src/blackgui/components/dbownmodelsetcomponent.cpp @@ -76,6 +76,8 @@ namespace BlackGui const CSimulatorInfo simulator = this->m_modelSetLoader.getSimulator(); if (simulator.isSingleSimulator()) { + ui->comp_SimulatorSelector->setValue(simulator); + ui->le_Simulator->setText(simulator.toQString(true)); QTimer::singleShot(500, [this]() { this->updateViewToCurrentModels(); diff --git a/src/blackgui/components/modelmatchercomponent.cpp b/src/blackgui/components/modelmatchercomponent.cpp index eb1d3541c..49b523a45 100644 --- a/src/blackgui/components/modelmatchercomponent.cpp +++ b/src/blackgui/components/modelmatchercomponent.cpp @@ -71,8 +71,8 @@ namespace BlackGui connect(ui->pb_ReverseLookup, &QPushButton::pressed, this, &CModelMatcherComponent::ps_reverseLookup); connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CModelMatcherComponent::ps_webDataRed); - const CSimulatorInfo sim(ui->comp_SimulatorSelector->getValue()); - this->m_modelSetLoader.changeSimulator(sim); + const CSimulatorInfo sim(this->m_modelSetLoader.getSimulator()); + ui->comp_SimulatorSelector->setValue(sim); this->redisplay(); }