diff --git a/platform/platform-impl/src/com/intellij/ui/layout/ChoicePropertyUiManager.kt b/platform/platform-impl/src/com/intellij/ui/layout/ChoicePropertyUiManager.kt index bb477bd51da0..73facf967efd 100644 --- a/platform/platform-impl/src/com/intellij/ui/layout/ChoicePropertyUiManager.kt +++ b/platform/platform-impl/src/com/intellij/ui/layout/ChoicePropertyUiManager.kt @@ -14,10 +14,11 @@ class ChoicePropertyUiManager(defaultChoice: T) { var selected: T get() = _selected set(value) { - updateSelection(components.firstOrNull { it.id == value }) + _selected = value + updateSelectedInfo(components.firstOrNull { it.id == value }) } - private fun updateSelection(newSelection: ChoiceInfo?) { + private fun updateSelectedInfo(newSelection: ChoiceInfo?) { currentSelection?.select(false) currentSelection = newSelection ?: return @@ -38,7 +39,8 @@ class ChoicePropertyUiManager(defaultChoice: T) { component.addActionListener(ActionListener { if (component.isSelected) { - updateSelection(info) + _selected = id + updateSelectedInfo(info) } }) }