Skip to content

Commit

Permalink
Fixed languages field
Browse files Browse the repository at this point in the history
  • Loading branch information
Minemobs committed Aug 24, 2021
1 parent 7a03bd0 commit 2700577
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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<OnDirectoryChoosed> {
run {
field("Languages", Orientation.HORIZONTAL, true) {
languagesField = field("Languages", Orientation.HORIZONTAL, true) {
combobox<String>(lang, controller.getAllLanguages(folderLoc!!))
}
}
Expand Down

0 comments on commit 2700577

Please sign in to comment.