Configuration: Ensure facet UI is initialized in apply() call
#KT-27187 Fixed
This commit is contained in:
@@ -241,7 +241,7 @@ class KotlinFacetEditorGeneralTab(
|
||||
}
|
||||
}
|
||||
|
||||
fun initialize() {
|
||||
fun initializeIfNeeded() {
|
||||
if (isInitialized) return
|
||||
|
||||
editor.initialize()
|
||||
@@ -277,7 +277,7 @@ class KotlinFacetEditorGeneralTab(
|
||||
}
|
||||
|
||||
override fun onTabEntering() {
|
||||
initialize()
|
||||
initializeIfNeeded()
|
||||
}
|
||||
|
||||
override fun isModified(): Boolean {
|
||||
@@ -298,6 +298,7 @@ class KotlinFacetEditorGeneralTab(
|
||||
}
|
||||
|
||||
override fun apply() {
|
||||
initializeIfNeeded()
|
||||
validateOnce {
|
||||
editor.compilerConfigurable.apply()
|
||||
with(configuration.settings) {
|
||||
|
||||
@@ -39,7 +39,7 @@ class MultipleKotlinFacetEditor(
|
||||
override fun createComponent(): JComponent? {
|
||||
return KotlinFacetEditorGeneralTab.EditorComponent(project, null).apply {
|
||||
initialize()
|
||||
editors.flatMap { it.editorTabs.filterIsInstance<KotlinFacetEditorGeneralTab>() }.forEach { it.initialize() }
|
||||
editors.flatMap { it.editorTabs.filterIsInstance<KotlinFacetEditorGeneralTab>() }.forEach { it.initializeIfNeeded() }
|
||||
helper.bind(useProjectSettingsCheckBox, editors) { it.tabEditor.useProjectSettingsCheckBox }
|
||||
helper.bind(targetPlatformComboBox, editors) { it.tabEditor.targetPlatformComboBox }
|
||||
with(compilerConfigurable) {
|
||||
|
||||
Reference in New Issue
Block a user