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