diff -r 1001e27dbbf1 -r 7d4df25af572 src/Tools/jEdit/src/debugger_dockable.scala --- a/src/Tools/jEdit/src/debugger_dockable.scala Mon Nov 18 14:47:17 2024 +0100 +++ b/src/Tools/jEdit/src/debugger_dockable.scala Mon Nov 18 15:05:31 2024 +0100 @@ -112,18 +112,16 @@ case _ => thread_contexts.headOption } - output.tree.clear() - - for (thread <- thread_contexts) { - val thread_node = Tree_View.Node(thread) - for ((_, i) <- thread.debug_states.zipWithIndex) - thread_node.add(Tree_View.Node(thread.select(i))) - output.tree.root.add(thread_node) + output.tree.init_model { + for (thread <- thread_contexts) { + val thread_node = Tree_View.Node(thread) + for ((_, i) <- thread.debug_states.zipWithIndex) { + thread_node.add(Tree_View.Node(thread.select(i))) + } + output.tree.root.add(thread_node) + } } - output.tree.reload_model() - - output.tree.expandRow(0) for (i <- Range.inclusive(output.tree.getRowCount - 1, 1, -1)) output.tree.expandRow(i) new_tree_selection match {