mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 09:35:39 -05:00
dont dispose serverTreeView every time hidden (#5092)
This commit is contained in:
@@ -56,10 +56,12 @@ export class ConnectionViewletPanel extends ViewletPanel {
|
||||
this._addServerGroupAction = this.instantiationService.createInstance(AddServerGroupAction,
|
||||
AddServerGroupAction.ID,
|
||||
AddServerGroupAction.LABEL);
|
||||
this._serverTreeView = this.instantiationService.createInstance(ServerTreeView);
|
||||
this._serverTreeView = this.objectExplorerService.getServerTreeView();
|
||||
if (!this._serverTreeView) {
|
||||
this._serverTreeView = this.instantiationService.createInstance(ServerTreeView);
|
||||
this.objectExplorerService.registerServerTreeView(this._serverTreeView);
|
||||
}
|
||||
this._activeConnectionsFilterAction = this._serverTreeView.activeConnectionsFilterAction;
|
||||
|
||||
this.objectExplorerService.registerServerTreeView(this._serverTreeView);
|
||||
}
|
||||
|
||||
protected renderHeader(container: HTMLElement): void {
|
||||
@@ -127,9 +129,8 @@ export class ConnectionViewletPanel extends ViewletPanel {
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this._serverTreeView.dispose();
|
||||
super.dispose();
|
||||
this.disposables = dispose(this.disposables);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
|
||||
@@ -117,7 +117,9 @@ export class DataExplorerViewlet extends ViewContainerViewlet {
|
||||
}
|
||||
|
||||
protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewletPanel {
|
||||
return this.instantiationService.createInstance(viewDescriptor.ctorDescriptor.ctor, options) as ViewletPanel;
|
||||
let viewletPanel = this.instantiationService.createInstance(viewDescriptor.ctorDescriptor.ctor, options) as ViewletPanel;
|
||||
this._register(viewletPanel);
|
||||
return viewletPanel;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
|
||||
Reference in New Issue
Block a user