From 793265722f4a53accd10644b3a86d585a77efbb9 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 24 Oct 2018 00:29:32 +0200 Subject: [PATCH] Ref T411, set SimObject directory from file browser + UI adjustments --- .../installfsxterrainprobecomponent.cpp | 12 +- .../installfsxterrainprobecomponent.ui | 103 ++++++++++-------- 2 files changed, 64 insertions(+), 51 deletions(-) diff --git a/src/blackgui/components/installfsxterrainprobecomponent.cpp b/src/blackgui/components/installfsxterrainprobecomponent.cpp index 052dceed6..451f55b82 100644 --- a/src/blackgui/components/installfsxterrainprobecomponent.cpp +++ b/src/blackgui/components/installfsxterrainprobecomponent.cpp @@ -44,8 +44,8 @@ namespace BlackGui connect(ui->pb_DirectoryBrowser, &QPushButton::released, this, &CInstallFsxTerrainProbeComponent::selectSimObjectsDir); connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &CInstallFsxTerrainProbeComponent::onSimulatorChanged); - QPointer myself; - QTimer::singleShot(250, this, [ = ] + QPointer myself(this); + QTimer::singleShot(500, this, [ = ] { if (!myself) { return; } this->onSimulatorChanged(ui->comp_SimulatorSelector->getValue()); @@ -86,8 +86,12 @@ namespace BlackGui void CInstallFsxTerrainProbeComponent::selectSimObjectsDir() { const QString startDirectory = CFileUtils::fixWindowsUncPath(ui->le_Target->text()); - const QString dir = QFileDialog::getExistingDirectory(this, "SimObjects directory", startDirectory, - QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + const QString dir = + CFileUtils::fixWindowsUncPath( + QFileDialog::getExistingDirectory( + this, "SimObjects directory", startDirectory, + QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks)); + ui->le_Target->setText(dir); } } // ns } // ns diff --git a/src/blackgui/components/installfsxterrainprobecomponent.ui b/src/blackgui/components/installfsxterrainprobecomponent.ui index 3a0345761..d6c1c339e 100644 --- a/src/blackgui/components/installfsxterrainprobecomponent.ui +++ b/src/blackgui/components/installfsxterrainprobecomponent.ui @@ -7,7 +7,7 @@ 0 0 427 - 189 + 205 @@ -62,41 +62,6 @@ Copy swift probe - - - - Target: - - - - - - - specify the SimObjects directory - - - - - - - Simulator: - - - - - - - ... - - - - - - - copy - - - @@ -112,7 +77,7 @@ 0 - + @@ -122,19 +87,61 @@ - - - - true - - - source directory of probe - - - + + + + Target: + + + + + + + specify the SimObjects directory + + + + + + + Simulator: + + + + + + + ... + + + + + + + true + + + source directory of probe + + + + + + + copy + + + + + + + Source: + + + @@ -149,7 +156,9 @@ + le_Source le_Target + pb_Copy pb_DirectoryBrowser