summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-02 13:00:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-02 13:00:54 (GMT)
commitd6413056544d14a1f9a1e8867569524a5f765d82 (patch)
treee4926ca1849a222204804bc2b40e7396c5ceb498 /Source
parent4f91d9d2c70958093d89a20e67d4788b2a57f09e (diff)
parent5671c5270b78e146a0e4c30837522dc61e5a8150 (diff)
downloadCMake-d6413056544d14a1f9a1e8867569524a5f765d82.zip
CMake-d6413056544d14a1f9a1e8867569524a5f765d82.tar.gz
CMake-d6413056544d14a1f9a1e8867569524a5f765d82.tar.bz2
Merge topic 'cmake-gui-platform-env'
5671c5270b cmake-gui: Fix selected item mismatched CMAKE_GENERATOR_PLATFORM env Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7629
Diffstat (limited to 'Source')
-rw-r--r--Source/QtDialog/FirstConfigure.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx
index f3c4a8b..707eaae 100644
--- a/Source/QtDialog/FirstConfigure.cxx
+++ b/Source/QtDialog/FirstConfigure.cxx
@@ -244,7 +244,8 @@ void StartCompilerSetup::onGeneratorChanged(int index)
if (!DefaultGeneratorPlatform.isEmpty()) {
int platform_index = platforms.indexOf(DefaultGeneratorPlatform);
if (platform_index != -1) {
- this->PlatformOptions->setCurrentIndex(platform_index);
+ // The index is off-by-one due to the first empty item added above.
+ this->PlatformOptions->setCurrentIndex(platform_index + 1);
}
}
} else {