From 730a0ab3838fa580cc8e8e0ec006bdf6f086277d Mon Sep 17 00:00:00 2001 From: CodeSteak Date: Fri, 14 Jun 2019 01:14:01 +0200 Subject: [PATCH] Fix "fix #46" --- .../view/importView/ImportViewController.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/importView/ImportViewController.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/importView/ImportViewController.kt index 5814216..fae7398 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/importView/ImportViewController.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/importView/ImportViewController.kt @@ -49,9 +49,7 @@ class ImportViewController : Controller() { fun btnImportAction() { rootc.importTexture(iv.tfFilePath.text, iv.tfName.text, iv.cvTags.chips) RootController.switchImportToMain() - iv.tfFilePath.clear() - iv.tfName.clear() - iv.cvTags.chips.clear() + reset() } fun validateImport() { @@ -61,8 +59,13 @@ class ImportViewController : Controller() { fun btnBackAction() { RootController.switchImportToMain() + reset() + } + + fun reset() { iv.tfFilePath.clear() iv.tfName.clear() iv.cvTags.chips.clear() + iv.preview.root.isVisible = false } }