提交 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)
.then(() => {
if (this.isVisible()) {
if (!wasVisible) {
this.refreshPanel();
}
} else {
this.rangeHighlightDecorations.removeHighlightRange(); this.rangeHighlightDecorations.removeHighlightRange();
} }
return promise; });
} }
public getActions(): IAction[] { public getActions(): IAction[] {
...@@ -166,6 +172,7 @@ export class MarkersPanel extends Panel { ...@@ -166,6 +172,7 @@ export class MarkersPanel extends Panel {
} }
private refreshPanel(): TPromise<any> { private refreshPanel(): TPromise<any> {
if (this.isVisible()) {
this.collapseAllAction.enabled = this.markersModel.hasFilteredResources(); this.collapseAllAction.enabled = this.markersModel.hasFilteredResources();
dom.toggleClass(this.treeContainer, 'hidden', !this.markersModel.hasFilteredResources()); dom.toggleClass(this.treeContainer, 'hidden', !this.markersModel.hasFilteredResources());
this.renderMessage(); this.renderMessage();
...@@ -174,6 +181,7 @@ export class MarkersPanel extends Panel { ...@@ -174,6 +181,7 @@ export class MarkersPanel extends Panel {
this.autoExpand(); 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.
先完成此消息的编辑!
想要评论请 注册