PY-26456 Send change event on setting up new SDK

This event is required to revalidate the new project dialog form.

Also updated the border rendering in the SDK list.
This commit is contained in:
Andrey Vlasovskikh
2017-10-11 04:34:42 +03:00
parent d870139be0
commit 92eb27389b
2 changed files with 6 additions and 2 deletions
@@ -117,6 +117,7 @@ public class PythonSdkChooserCombo extends ComboboxWithBrowseButton {
selectedSdk = oldSelectedSdk;
}
comboBox.setModel(new CollectionComboBoxModel<>(allSdks, selectedSdk));
notifyChanged(null);
});
}
@@ -23,8 +23,9 @@ import com.intellij.openapi.util.IconLoader
import com.intellij.openapi.util.io.FileUtil
import com.intellij.ui.ColoredListCellRenderer
import com.intellij.ui.LayeredIcon
import com.intellij.ui.ListCellRendererWrapper
import com.intellij.ui.SimpleTextAttributes
import com.intellij.ui.TitledSeparator
import com.intellij.util.ui.JBUI
import com.jetbrains.python.sdk.flavors.PythonSdkFlavor
import java.awt.Component
import javax.swing.Icon
@@ -37,7 +38,9 @@ open class PySdkListCellRenderer(private val sdkModifiers: Map<Sdk, SdkModificat
override fun getListCellRendererComponent(list: JList<out Any>?, value: Any?, index: Int, selected: Boolean,
hasFocus: Boolean): Component =
when (value) {
SEPARATOR -> ListCellRendererWrapper.createSeparator(null)
SEPARATOR -> TitledSeparator(null).apply {
border = JBUI.Borders.empty()
}
else -> super.getListCellRendererComponent(list, value, index, selected, hasFocus)
}