Skip to content

Commit 0ed15a5

Browse files
authored
Merge pull request #209 from sebjulliand/fix/cancelButtonAfterError
Always turn cancel button off when a query is done
2 parents 727d87f + 4ac198d commit 0ed15a5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/views/results/resultSetPanelProvider.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { WebviewView, WebviewViewResolveContext, CancellationToken, commands } from "vscode";
1+
import { CancellationToken, WebviewView, WebviewViewResolveContext, commands } from "vscode";
22

3+
import { setCancelButtonVisibility } from ".";
4+
import { JobManager } from "../../config";
35
import { Query, QueryState } from "../../connection/query";
4-
import * as html from "./html";
56
import { updateStatusBar } from "../jobManager/statusBar";
6-
import { JobManager } from "../../config";
7-
import { setCancelButtonVisibility } from ".";
7+
import * as html from "./html";
88

99
export class ResultSetPanelProvider {
1010
_view: WebviewView;
@@ -40,8 +40,6 @@ export class ResultSetPanelProvider {
4040

4141
let queryResults = queryObject.getState() == QueryState.RUN_MORE_DATA_AVAILABLE ? await queryObject.fetchMore() : await queryObject.run();
4242

43-
setCancelButtonVisibility(false);
44-
4543
data = queryResults.data;
4644
this._view.webview.postMessage({
4745
command: `rows`,
@@ -62,6 +60,7 @@ export class ResultSetPanelProvider {
6260
});
6361
}
6462

63+
setCancelButtonVisibility(false);
6564
updateStatusBar();
6665
}
6766
});

0 commit comments

Comments
 (0)