From 0123dbce2111b1a82b10309e101e1a1e8e48fe87 Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Mon, 10 Feb 2020 16:27:31 +0300 Subject: [PATCH] Wizard: trim paths in UI #KT-36163 fixed --- .../projectWizard/wizard/ui/components/PathFieldComponent.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/PathFieldComponent.kt b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/PathFieldComponent.kt index b29e4e67447..13816dbd500 100644 --- a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/PathFieldComponent.kt +++ b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/PathFieldComponent.kt @@ -31,7 +31,7 @@ class PathFieldComponent( onValueUpdate ) { override val uiComponent: TextFieldWithBrowseButton = TextFieldWithBrowseButton( - textField(initialValue?.toString().orEmpty()) { path -> fireValueUpdated(Paths.get(path)) } + textField(initialValue?.toString().orEmpty()) { path -> fireValueUpdated(Paths.get(path.trim())) } ).apply { addBrowseFolderListener( TextBrowseFolderListener( @@ -45,5 +45,5 @@ class PathFieldComponent( uiComponent.text = newValue.toString() } - override fun getUiValue(): Path = Paths.get(uiComponent.text) + override fun getUiValue(): Path = Paths.get(uiComponent.text.trim()) } \ No newline at end of file