Avoid opening the results panel on db deletion
Fixes https://github.com/github/vscode-codeql/issues/823
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
- Avoid showing an error popup when user runs a query with `@kind table` metadata. [#814](https://github.com/github/vscode-codeql/pull/814)
|
||||
- Add an option to jump from a .qlref file to the .ql file it references. [#815](https://github.com/github/vscode-codeql/pull/815)
|
||||
- Avoid opening the results panel when a database is deleted. [#831](https://github.com/github/vscode-codeql/pull/831)
|
||||
|
||||
## 1.4.5 - 22 March 2021
|
||||
|
||||
|
||||
@@ -137,9 +137,11 @@ export class InterfaceManager extends DisposableObject {
|
||||
this.databaseManager.onDidChangeDatabaseItem(({ kind }) => {
|
||||
if (kind === DatabaseEventKind.Remove) {
|
||||
this._diagnosticCollection.clear();
|
||||
this.postMessage({
|
||||
t: 'untoggleShowProblems'
|
||||
});
|
||||
if (this.isShowingPanel()) {
|
||||
this.postMessage({
|
||||
t: 'untoggleShowProblems'
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
@@ -149,6 +151,10 @@ export class InterfaceManager extends DisposableObject {
|
||||
this.postMessage({ t: 'navigatePath', direction });
|
||||
}
|
||||
|
||||
private isShowingPanel() {
|
||||
return !!this._panel;
|
||||
}
|
||||
|
||||
// Returns the webview panel, creating it if it doesn't already
|
||||
// exist.
|
||||
getPanel(): vscode.WebviewPanel {
|
||||
@@ -168,6 +174,14 @@ export class InterfaceManager extends DisposableObject {
|
||||
]
|
||||
}
|
||||
));
|
||||
// this._panel.onDidChangeViewState(
|
||||
// (e) => {
|
||||
// this.logger.log(JSON.stringify(e));
|
||||
// },
|
||||
// null,
|
||||
// ctx.subscriptions
|
||||
// );
|
||||
|
||||
this._panel.onDidDispose(
|
||||
() => {
|
||||
this._panel = undefined;
|
||||
|
||||
Reference in New Issue
Block a user