mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
cmake-gui: Fix selected item mismatched CMAKE_GENERATOR_PLATFORM env
The first empty item in the combobox causes a misalignment with the actual setting by `CMAKE_GENERATOR_PLATFORM` environment variable.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user