提交 a3b9e848 编写于 作者: S Sandeep Somavarapu

Fix #38966

上级 e1131e3e
...@@ -122,11 +122,17 @@ export class MarkersPanel extends Panel { ...@@ -122,11 +122,17 @@ export class MarkersPanel extends Panel {
} }
public setVisible(visible: boolean): TPromise<void> { public setVisible(visible: boolean): TPromise<void> {
let promise: TPromise<void> = super.setVisible(visible); const wasVisible = this.isVisible();
if (!visible) { return super.setVisible(visible)
this.rangeHighlightDecorations.removeHighlightRange(); .then(() => {
} if (this.isVisible()) {
return promise; if (!wasVisible) {
this.refreshPanel();
}
} else {
this.rangeHighlightDecorations.removeHighlightRange();
}
});
} }
public getActions(): IAction[] { public getActions(): IAction[] {
...@@ -166,13 +172,15 @@ export class MarkersPanel extends Panel { ...@@ -166,13 +172,15 @@ export class MarkersPanel extends Panel {
} }
private refreshPanel(): TPromise<any> { private refreshPanel(): TPromise<any> {
this.collapseAllAction.enabled = this.markersModel.hasFilteredResources(); if (this.isVisible()) {
dom.toggleClass(this.treeContainer, 'hidden', !this.markersModel.hasFilteredResources()); this.collapseAllAction.enabled = this.markersModel.hasFilteredResources();
this.renderMessage(); dom.toggleClass(this.treeContainer, 'hidden', !this.markersModel.hasFilteredResources());
if (this.markersModel.hasFilteredResources()) { this.renderMessage();
return this.tree.refresh().then(() => { if (this.markersModel.hasFilteredResources()) {
this.autoExpand(); return this.tree.refresh().then(() => {
}); this.autoExpand();
});
}
} }
return TPromise.as(null); return TPromise.as(null);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册