Skip to content
Snippets Groups Projects
Commit 57b89054 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Fix open last project threading

parent 79038474
Branches
Tags
No related merge requests found
......@@ -5,6 +5,7 @@ import java.util.UUID
import de.thecodelabs.utils.application
import de.tobias.playpad.PlayPadImpl
import de.tobias.playpad.project.ref.ProjectReferenceManager
import javafx.application.Platform
class OpenLastDocumentTask extends PlayPadInitializeTask {
override def name(): String = "Open Last Document"
......@@ -13,7 +14,7 @@ class OpenLastDocumentTask extends PlayPadInitializeTask {
if (instance.getGlobalSettings.isOpenLastDocument) {
val value = app.getUserDefaults.getData("project").asInstanceOf[UUID]
if (value != null) {
instance.openProject(ProjectReferenceManager.getProject(value), null)
Platform.runLater(() => instance.openProject(ProjectReferenceManager.getProject(value), null))
throw new PlayPadInitializeAbortException(this)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment