Wizard: fix when first selected template cannot be applied

This commit is contained in:
Ilya Kirillov
2020-09-08 17:15:35 +03:00
parent 3a6011fae9
commit ce00366c7f
@@ -54,6 +54,7 @@ class ProjectTemplateSettingComponent(
addToBottom(templateDescriptionComponent.component.addBorder(JBUI.Borders.empty(/*top*/8,/*left*/ 3, 0, 0))) addToBottom(templateDescriptionComponent.component.addBorder(JBUI.Borders.empty(/*top*/8,/*left*/ 3, 0, 0)))
} }
private fun applySelectedTemplate() = modify { private fun applySelectedTemplate() = modify {
value?.let(::applyProjectTemplate) value?.let(::applyProjectTemplate)
} }
@@ -74,6 +75,7 @@ class ProjectTemplateSettingComponent(
if (setting.type.values.isNotEmpty()) { if (setting.type.values.isNotEmpty()) {
list.selectedIndex = 0 list.selectedIndex = 0
value = setting.type.values.firstOrNull() value = setting.type.values.firstOrNull()
applySelectedTemplate()
} }
} }
} }