src/Tools/jEdit/src/session_dockable.scala
changeset 44960 640c2b957f16
parent 44958 86e4916825ee
child 44980 ad5883642a83
     1.1 --- a/src/Tools/jEdit/src/session_dockable.scala	Sat Sep 17 23:04:03 2011 +0200
     1.2 +++ b/src/Tools/jEdit/src/session_dockable.scala	Sun Sep 18 00:05:22 2011 +0200
     1.3 @@ -138,20 +138,20 @@
     1.4    {
     1.5      Swing_Thread.now {
     1.6        // FIXME correlation to changed_nodes!?
     1.7 -      val state = Isabelle.session.current_state()
     1.8 -      val version = state.recent_stable.version.get_finished
     1.9 +      val snapshot = Isabelle.session.snapshot()
    1.10  
    1.11        var nodes_status1 = nodes_status
    1.12        for {
    1.13          name <- changed_nodes
    1.14 -        node <- version.nodes.get(name)
    1.15 -        val status = Isar_Document.node_status(state, version, node)
    1.16 +        node <- snapshot.version.nodes.get(name)
    1.17 +        val status = Isar_Document.node_status(snapshot.state, snapshot.version, node)
    1.18        } nodes_status1 += (name -> status)
    1.19  
    1.20        if (nodes_status != nodes_status1) {
    1.21          nodes_status = nodes_status1
    1.22          status.listData =
    1.23 -          Library.sort_wrt((name: Document.Node.Name) => name.node, nodes_status.keySet.toList)
    1.24 +          snapshot.version.topological_order.filter(
    1.25 +            (name: Document.Node.Name) => nodes_status.isDefinedAt(name))
    1.26        }
    1.27      }
    1.28    }