Bug 140561debug view scrolls to top, loses thread focus
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java index ed92fb2..cf33d60 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java
@@ -973,8 +973,14 @@ protected void nodeChildRemoved(ModelNode parentNode, int index) { Widget widget = findItem(parentNode); if (widget != null && !widget.isDisposed()) { + Widget childWidget = getChildWidget(widget, index); int childCount = parentNode.getChildCount(); - setItemCount(widget, childCount); + // if the child widget exists, dispose it so item state remains, otherwise update child count + if (childWidget == null) { + setItemCount(widget, childCount); + } else { + childWidget.dispose(); + } for (int i = index; i < childCount; i ++) { clearChild(widget, i); }