提交 dd40ab9c 编写于 作者: I isidor

callstack reduce selection updating

fixes #80004
上级 4d2b972e
......@@ -52,6 +52,7 @@ export class CallStackView extends ViewletPanel {
private tree!: WorkbenchAsyncDataTree<CallStackItem | IDebugModel, CallStackItem, FuzzyScore>;
private contributedContextMenu: IMenu;
private parentSessionToExpand = new Set<IDebugSession>();
private selectionNeedsUpdate = false;
constructor(
private options: IViewletViewOptions,
......@@ -90,7 +91,10 @@ export class CallStackView extends ViewletPanel {
this.tree.updateChildren().then(() => {
this.parentSessionToExpand.forEach(s => this.tree.expand(s));
this.parentSessionToExpand.clear();
this.updateTreeSelection();
if (this.selectionNeedsUpdate) {
this.selectionNeedsUpdate = false;
this.updateTreeSelection();
}
});
}, 50);
}
......@@ -205,8 +209,8 @@ export class CallStackView extends ViewletPanel {
this.onCallStackChangeScheduler.schedule();
}
}));
const onCallStackChange = Event.any<any>(this.debugService.getViewModel().onDidFocusStackFrame, this.debugService.getViewModel().onDidFocusSession);
this._register(onCallStackChange(() => {
const onFocusChange = Event.any<any>(this.debugService.getViewModel().onDidFocusStackFrame, this.debugService.getViewModel().onDidFocusSession);
this._register(onFocusChange(() => {
if (this.ignoreFocusStackFrameEvent) {
return;
}
......@@ -214,6 +218,10 @@ export class CallStackView extends ViewletPanel {
this.needsRefresh = true;
return;
}
if (this.onCallStackChangeScheduler.isScheduled()) {
this.selectionNeedsUpdate = true;
return;
}
this.updateTreeSelection();
}));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册