clarified default selection;
authorwenzelm
Mon, 10 Aug 2015 22:34:00 +0200
changeset 60886 0165aac83cdb
parent 60885 d8d51f956f05
child 60887 9d8b244234ab
clarified default selection;
src/Tools/jEdit/src/debugger_dockable.scala
--- a/src/Tools/jEdit/src/debugger_dockable.scala	Mon Aug 10 22:21:55 2015 +0200
+++ b/src/Tools/jEdit/src/debugger_dockable.scala	Mon Aug 10 22:34:00 2015 +0200
@@ -168,7 +168,9 @@
 
   private def update_tree(thread_entries: List[Debugger_Dockable.Thread_Entry])
   {
-    val old_thread_selection = thread_selection()
+    val old_thread_selection =
+      thread_selection() orElse
+      thread_entries.collectFirst { case t if t.debug_states.nonEmpty => t.thread_name }
 
     tree.clearSelection
     root.removeAllChildren