parent
74565e5744
commit
f026a0dcf7
|
@ -310,9 +310,12 @@ class RootController : Controller() {
|
|||
}
|
||||
}
|
||||
|
||||
fun switchImportToMain() {
|
||||
fun switchImportToMain(needsReload: Boolean) {
|
||||
Platform.runLater {
|
||||
find(ImportView::class).replaceWith(MainView::class, ViewTransition.FadeThrough(0.01.seconds))
|
||||
if (needsReload) {
|
||||
find(MainView::class).repeatSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class ImportViewController : Controller() {
|
|||
|
||||
fun btnImportAction() {
|
||||
rootc.importTexture(iv.tfFilePath.text, iv.tfName.text, iv.cvTags.chips)
|
||||
RootController.switchImportToMain()
|
||||
RootController.switchImportToMain(true)
|
||||
reset()
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class ImportViewController : Controller() {
|
|||
}
|
||||
|
||||
fun btnBackAction() {
|
||||
RootController.switchImportToMain()
|
||||
RootController.switchImportToMain(false)
|
||||
reset()
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,10 @@ class MainView : View("TextureSync") {
|
|||
|
||||
private val mvc: MainViewController by inject()
|
||||
|
||||
fun repeatSearch() {
|
||||
mvc.cvSearchAction(cvSearch.chips)
|
||||
}
|
||||
|
||||
override val root = anchorpane {
|
||||
|
||||
background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY))
|
||||
|
|
Loading…
Reference in New Issue