diff --git a/src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala b/src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala index a7e57b1..b8f112d 100644 --- a/src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala +++ b/src/main/scala/org/gerweck/scalafx/util/SingletonStage.scala @@ -31,5 +31,10 @@ abstract class SingletonStage { protected trait ParentStage extends Stage { require(singletonStage.isEmpty, s"Cannot have two ${name} stages") logger.debug(s"Creating singleton ${name} stage") + + override def close() = { + singletonStage = None + super.close() + } } }