From 1a65dd741def4a25c74ded7f9a5c86e73cc2cedb Mon Sep 17 00:00:00 2001 From: Sergei Vorobyov Date: Thu, 19 Dec 2019 16:36:05 +0300 Subject: [PATCH] IDEA-CR-56535 resolved merge conflict with master GitOrigin-RevId: 2ce539bb76fe0da33e2a2d0e48fa5f8ca2ce3e34 --- .../openapi/roots/ui/configuration/SdkComboBox.kt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/SdkComboBox.kt b/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/SdkComboBox.kt index 10fc8c2216b5..8eb485ed6ae2 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/SdkComboBox.kt +++ b/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/SdkComboBox.kt @@ -15,14 +15,11 @@ class SdkComboBox(model: SdkComboBoxModel) : SdkComboBoxBase(model. setModel(model.copyAndSetListModel(listModel)) } - override fun onNewSdkAdded(sdk: Sdk) { - setSelectedSdk(sdk) - } - override fun setSelectedItem(anObject: Any?) { - if (anObject is SdkListItem.ActionableItem) { - anObject.executeAction() - return + if (anObject is SdkListItem) { + if (myModel.executeAction(this, anObject, ::setSelectedItem)) { + return + } } reloadModel() super.setSelectedItem(anObject) @@ -62,7 +59,7 @@ class SdkComboBox(model: SdkComboBoxModel) : SdkComboBoxBase(model. override fun popupMenuWillBecomeVisible(e: PopupMenuEvent) { val disposable = Disposer.newDisposable() setReloadDisposable(disposable) - myModel.reloadActions(this@SdkComboBox, getSelectedSdk()) + myModel.reloadActions() myModel.detectItems(this@SdkComboBox, disposable) }