Fix Agent tabs not switching (#6271)

This commit is contained in:
Charles Gagnon
2019-07-08 10:25:12 -07:00
committed by GitHub
parent 47e3761159
commit 259f3f5892
2 changed files with 7 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ interface IInternalPanelTab {
disposables: IDisposable[];
label: HTMLElement;
body?: HTMLElement;
destoryTabBody?: boolean;
destroyTabBody?: boolean;
}
const defaultOptions: IPanelOptions = {
@@ -115,10 +115,10 @@ export class TabbedPanel extends Disposable {
return this._tabMap.has(tab.identifier);
}
public pushTab(tab: IPanelTab, index?: number, destoryTabBody?: boolean): PanelTabIdentifier {
public pushTab(tab: IPanelTab, index?: number, destroyTabBody?: boolean): PanelTabIdentifier {
let internalTab = { tab } as IInternalPanelTab;
internalTab.disposables = [];
internalTab.destoryTabBody = destoryTabBody;
internalTab.destroyTabBody = destroyTabBody;
this._tabMap.set(tab.identifier, internalTab);
this._createTab(internalTab, index);
if (!this._shownTabId) {
@@ -203,7 +203,7 @@ export class TabbedPanel extends Disposable {
this.tabHistory.push(id);
const tab = this._tabMap.get(this._shownTabId)!; // @anthonydresser we know this can't be undefined since we check further up if the map contains the id
if (tab.destoryTabBody && tab.body) {
if (tab.destroyTabBody && tab.body) {
tab.body.remove();
tab.body = undefined;
}

View File

@@ -22,7 +22,7 @@ const PREVIOUS_LABEL = nls.localize('dialogPreviousLabel', 'Previous');
class ModelViewPanelImpl implements azdata.window.ModelViewPanel {
private _modelView: azdata.ModelView;
private static _handle: number;
private _handle: number;
protected _modelViewId: string;
protected _valid: boolean = true;
protected _onValidityChanged: vscode.Event<boolean>;
@@ -37,7 +37,7 @@ class ModelViewPanelImpl implements azdata.window.ModelViewPanel {
public registerContent(handler: (view: azdata.ModelView) => Thenable<void>): void {
if (!this._modelViewId) {
let viewId = this._viewType + ModelViewPanelImpl._handle;
let viewId = this._viewType + this._handle;
this.setModelViewId(viewId);
this._extHostModelView.$registerProvider(viewId, modelView => {
this._modelView = modelView;
@@ -47,7 +47,7 @@ class ModelViewPanelImpl implements azdata.window.ModelViewPanel {
}
public set handle(value: number) {
ModelViewPanelImpl._handle = value;
this._handle = value;
}
public setModelViewId(value: string) {