Worarround for #43 #44

Use 'invisible' ViewTransition (0.01 seconds)
Fixes #43
Fixes #44
This commit is contained in:
CodeSteak 2019-06-14 12:19:55 +02:00
parent 8f3b61462a
commit 95496536db
1 changed files with 4 additions and 6 deletions

View File

@ -18,9 +18,7 @@ import org.hso.texturesyncclient.view.mainView.MainView
import org.hso.texturesyncclient.view.mainView.MainViewController import org.hso.texturesyncclient.view.mainView.MainViewController
import org.hso.texturesyncclient.view.startupView.StartupView import org.hso.texturesyncclient.view.startupView.StartupView
import org.hso.texturesyncclient.view.startupView.StartupViewController import org.hso.texturesyncclient.view.startupView.StartupViewController
import tornadofx.Controller import tornadofx.*
import tornadofx.find
import tornadofx.observable
import java.io.File import java.io.File
import java.io.FileOutputStream import java.io.FileOutputStream
import java.io.IOException import java.io.IOException
@ -301,20 +299,20 @@ class RootController : Controller() {
fun switchStartupToMain() { fun switchStartupToMain() {
Platform.runLater { Platform.runLater {
find(StartupView::class).replaceWith(MainView::class, sizeToScene = true, centerOnScreen = true) find(StartupView::class).replaceWith(MainView::class, ViewTransition.FadeThrough(0.01.seconds))
} }
} }
// These runLater calls should be unnecessary // These runLater calls should be unnecessary
fun switchMainToImport() { fun switchMainToImport() {
Platform.runLater { Platform.runLater {
find(MainView::class).replaceWith(ImportView::class, sizeToScene = true, centerOnScreen = true) find(MainView::class).replaceWith(ImportView::class, ViewTransition.FadeThrough(0.01.seconds))
} }
} }
fun switchImportToMain() { fun switchImportToMain() {
Platform.runLater { Platform.runLater {
find(ImportView::class).replaceWith(MainView::class, sizeToScene = true, centerOnScreen = true) find(ImportView::class).replaceWith(MainView::class, ViewTransition.FadeThrough(0.01.seconds))
} }
} }
} }