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 } }