src/Tools/jEdit/src/prover/Command.scala
changeset 34534 b06946a1d4cb
parent 34511 5839e34ef0bd
parent 34533 35308320713a
child 34539 5d88e0681d44
--- a/src/Tools/jEdit/src/prover/Command.scala	Mon Feb 02 23:08:44 2009 +0100
+++ b/src/Tools/jEdit/src/prover/Command.scala	Mon Mar 02 19:27:06 2009 +0100
@@ -72,6 +72,7 @@
   def status = _status
   def status_=(st: Command.Status.Value) {
     if (st == Command.Status.UNPROCESSED) {
+      state_results.clear
       // delete markup
       for (child <- root_node.children) {
         child.children = Nil
@@ -85,7 +86,7 @@
 
   private val results = new mutable.ListBuffer[XML.Tree]
   private val state_results = new mutable.ListBuffer[XML.Tree]
-  def add_result(running: Boolean, tree: XML.Tree) {
+  def add_result(running: Boolean, tree: XML.Tree) = synchronized {
     (if (running) state_results else results) += tree
   }