mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-87617 Fix WSL browse dialog when text field is null
There was a problem when browse dialog was invoked with null value in the text field. This is possible when the field is a combo box, but there are no values present. The fix is to fallback to default directory (user home and then root) in case of null in the text field. GitOrigin-RevId: ebd4f834ab696017ddb6fcaf02e0b519e3decc33
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6d14e01216
commit
48db617862
@@ -79,7 +79,7 @@ class WslTargetType : TargetEnvironmentType<WslTargetEnvironmentConfiguration>(T
|
||||
configuration.distribution?.let {
|
||||
val textAccessor = object : TextAccessor {
|
||||
override fun setText(text: String) = textComponentAccessor.setText(component, text)
|
||||
override fun getText() = textComponentAccessor.getText(component)
|
||||
override fun getText(): @NlsSafe String = textComponentAccessor.getText(component) ?: it.userHome ?: "/"
|
||||
}
|
||||
browseWslPath(textAccessor,
|
||||
it,
|
||||
|
||||
Reference in New Issue
Block a user