From ac1f7542a930d7bad71f3621cbe4d6c338241a68 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Mon, 15 Oct 2018 17:18:14 -0700 Subject: [PATCH] change way we show query plan (#2866) --- src/sql/parts/query/editor/queryResultsView.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sql/parts/query/editor/queryResultsView.ts b/src/sql/parts/query/editor/queryResultsView.ts index 67eb615482..ed973a7363 100644 --- a/src/sql/parts/query/editor/queryResultsView.ts +++ b/src/sql/parts/query/editor/queryResultsView.ts @@ -203,12 +203,12 @@ export class QueryResultsView { if (!this._panelView.contains(this.qpTab)) { this._panelView.pushTab(this.qpTab); } - } else if (queryRunner.isQueryPlan) { - let disp = queryRunner.onResultSet(() => { - this.showPlan(queryRunner.planXml); - disp.dispose(); - }); } + this.runnerDisposables.push(queryRunner.onResultSet(() => { + if (queryRunner.isQueryPlan) { + this.showPlan(queryRunner.planXml); + } + })); if (this.input.state.activeTab) { this._panelView.showTab(this.input.state.activeTab); }