From 2700577b1b5a67cabe37128f5ab5d11b2d27e07d Mon Sep 17 00:00:00 2001 From: minemobs Date: Tue, 24 Aug 2021 18:35:08 +0200 Subject: [PATCH] Fixed languages field --- .../fr/minemobs/pepitedorlocalization/view/MainView.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/fr/minemobs/pepitedorlocalization/view/MainView.kt b/src/main/kotlin/fr/minemobs/pepitedorlocalization/view/MainView.kt index 41c4c68..fbbfb34 100644 --- a/src/main/kotlin/fr/minemobs/pepitedorlocalization/view/MainView.kt +++ b/src/main/kotlin/fr/minemobs/pepitedorlocalization/view/MainView.kt @@ -28,6 +28,7 @@ class MainView : View("Pepite D'or Localization UI") { private val key = SimpleStringProperty() private var lang = SimpleStringProperty() private var translatedString = SimpleStringProperty() + private var languagesField : Field? = null; override val root = form { fieldset { @@ -37,14 +38,14 @@ class MainView : View("Pepite D'or Localization UI") { val dir = chooseDirectory("Select Target Directory") ?: return@action if(!dir.isDirectory) return@action folderLoc = dir - fire(OnDirectoryChoosed) + if(languagesField == null) fire(OnDirectoryChoosed) } } } subscribe { run { - field("Languages", Orientation.HORIZONTAL, true) { + languagesField = field("Languages", Orientation.HORIZONTAL, true) { combobox(lang, controller.getAllLanguages(folderLoc!!)) } }