src/Tools/jEdit/src/plugin.scala
changeset 49195 9d10bd85c1be
parent 49101 21c8d2070be9
child 49245 cb70157293c0
--- a/src/Tools/jEdit/src/plugin.scala	Fri Sep 07 13:58:43 2012 +0200
+++ b/src/Tools/jEdit/src/plugin.scala	Fri Sep 07 13:58:54 2012 +0200
@@ -416,11 +416,11 @@
 
             case Session.Ready =>
               Isabelle.jedit_buffers.foreach(Isabelle.init_model)
-              delay_load(true)
+              Swing_Thread.later { delay_load.invoke() }
 
             case Session.Shutdown =>
               Isabelle.jedit_buffers.foreach(Isabelle.exit_model)
-              delay_load(false)
+              Swing_Thread.later { delay_load.revoke() }
 
             case _ =>
           }
@@ -458,7 +458,7 @@
           if (Isabelle.session.is_ready) {
             val buffer = msg.getBuffer
             if (buffer != null && !buffer.isLoading) Isabelle.init_model(buffer)
-            delay_load(true)
+            Swing_Thread.later { delay_load.invoke() }
           }
 
         case msg: EditPaneUpdate