diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt b/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt index 8465311..dea6191 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt @@ -303,7 +303,6 @@ class RootController : Controller() { fun switchMainToImport() { Platform.runLater { find(MainView::class).replaceWith(ImportView::class, sizeToScene = true, centerOnScreen = true) - find(ImportView::class).reset() } } diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/importView/ImportView.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/importView/ImportView.kt index a151af5..ddaee6f 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/importView/ImportView.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/importView/ImportView.kt @@ -3,13 +3,13 @@ package org.hso.texturesyncclient.view.importView import com.jfoenix.controls.JFXButton import com.jfoenix.controls.JFXChipView import com.jfoenix.controls.JFXTextField -import javafx.geometry.Insets import javafx.geometry.Pos import javafx.scene.layout.Background +import javafx.geometry.Insets import javafx.scene.layout.BackgroundFill import javafx.scene.layout.CornerRadii -import javafx.scene.layout.Priority import javafx.scene.paint.Paint +import javafx.scene.layout.Priority import org.hso.texturesyncclient.view.mainView.Preview3D import tornadofx.* @@ -27,10 +27,6 @@ class ImportView : View("TextureSync") { private val ivc: ImportViewController by inject() init { - reset() - } - - fun reset() { btnImport.isVisible = false preview.root.isVisible = false } @@ -97,12 +93,11 @@ class ImportView : View("TextureSync") { //TODO change color of ChipĀ“s see: https://github.com/jfoenixadmin/JFoenix/blob/master/jfoenix/src/main/resources/com/jfoenix/assets/css/controls/jfx-chip-view.css#L52 btnImport.style = "-fx-button-type: RAISED; -fx-background-color: #b15b2e; -fx-text-fill: #3c3f41;" - btnBack.style = - "-fx-button-type: RAISED; -fx-background-color: #3c3f41; -fx-text-fill: #2b7bbb; -fx-padding: 10;" + btnBack.style = "-fx-button-type: RAISED; -fx-background-color: #3c3f41; -fx-text-fill: #2b7bbb; -fx-padding: 10;" } - tfFilePath.textProperty().addListener { _, _, _ -> ivc.validateImport() } - tfName.textProperty().addListener { _, _, _ -> ivc.validateImport() } + tfFilePath.textProperty().addListener{ _, _, _ -> ivc.validateImport() } + tfName.textProperty().addListener{ _, _, _ -> ivc.validateImport() } cvTags.chips.onChange { ivc.validateImport()