From 0db1683aa3a6c76fa1a4d8ad2c6597dced3cb0e1 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 27 Aug 2018 16:39:01 +0200 Subject: [PATCH] Init simulator display field, shorter text, typo --- src/blackgui/components/dbownmodelscomponent.cpp | 1 + src/blackgui/components/dbownmodelsetcomponent.cpp | 4 +++- src/blackgui/components/firstmodelsetcomponent.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/blackgui/components/dbownmodelscomponent.cpp b/src/blackgui/components/dbownmodelscomponent.cpp index 77b989d51..5e9035f3d 100644 --- a/src/blackgui/components/dbownmodelscomponent.cpp +++ b/src/blackgui/components/dbownmodelscomponent.cpp @@ -64,6 +64,7 @@ namespace BlackGui const CSimulatorInfo simulator = ui->comp_SimulatorSelector->getValue(); if (simulator.isSingleSimulator()) { + ui->le_Simulator->setText(simulator.toQString(true)); m_simulator = simulator; const bool success = this->initModelLoader(simulator, IAircraftModelLoader::CacheOnly); if (!success) diff --git a/src/blackgui/components/dbownmodelsetcomponent.cpp b/src/blackgui/components/dbownmodelsetcomponent.cpp index 86e181d35..2cb176152 100644 --- a/src/blackgui/components/dbownmodelsetcomponent.cpp +++ b/src/blackgui/components/dbownmodelsetcomponent.cpp @@ -73,6 +73,7 @@ namespace BlackGui ui->comp_SimulatorSelector->setMode(CSimulatorSelector::RadioButtons); ui->comp_SimulatorSelector->setRememberSelectionAndSetToLastSelection(); const CSimulatorInfo simulator = ui->comp_SimulatorSelector->getValue(); + ui->le_Simulator->setText(simulator.toQString(true)); //! \fixme maybe it would be better to set those in stylesheet file ui->pb_SaveAsSetForSimulator->setStyleSheet("padding-left: 3px; padding-right: 3px;"); @@ -263,8 +264,9 @@ namespace BlackGui ui->pb_SaveAsSetForSimulator->setEnabled(canSave); if (canSave) { + static const QString ss("save %1"); this->setSaveFileName(this->getModelSetSimulator()); - ui->pb_SaveAsSetForSimulator->setText("save for " + this->getModelSetSimulator().toQString(true)); + ui->pb_SaveAsSetForSimulator->setText(ss.arg(this->getModelSetSimulator().toQString(true))); } else { diff --git a/src/blackgui/components/firstmodelsetcomponent.cpp b/src/blackgui/components/firstmodelsetcomponent.cpp index f0d247023..4670d49c4 100644 --- a/src/blackgui/components/firstmodelsetcomponent.cpp +++ b/src/blackgui/components/firstmodelsetcomponent.cpp @@ -162,7 +162,7 @@ namespace BlackGui bool loadOnlyIfNotEmpty = true; if (m_modelsDialog->getOwnModelsCount() > 0) { - const QMessageBox::StandardButton reply = QMessageBox::warning(this->mainWindow(), "Model loading", "Reload the models?\nThe xisting cache data will we overridden.", QMessageBox::Yes | QMessageBox::No); + const QMessageBox::StandardButton reply = QMessageBox::warning(this->mainWindow(), "Model loading", "Reload the models?\nThe existing cache data will we overridden.", QMessageBox::Yes | QMessageBox::No); if (reply == QMessageBox::Yes) { loadOnlyIfNotEmpty = false; } } m_modelsDialog->requestModelsInBackground(simulator, loadOnlyIfNotEmpty);