mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
clear title control when closing
This commit is contained in:
parent
86175ecaee
commit
2cc248adcc
|
@ -133,13 +133,12 @@ export class NoTabsTitleControl extends TitleControl {
|
|||
}
|
||||
|
||||
protected doRefresh(): void {
|
||||
if (!this.context) {
|
||||
return;
|
||||
}
|
||||
|
||||
const group = this.context;
|
||||
const editor = group.activeEditor;
|
||||
const editor = group && group.activeEditor;
|
||||
if (!editor) {
|
||||
this.titleLabel.innerText = '';
|
||||
this.titleDescription.innerText = '';
|
||||
|
||||
this.editorActionsToolbar.setActions([], [])();
|
||||
|
||||
this.currentPrimaryEditorActionIds = [];
|
||||
|
|
|
@ -214,13 +214,11 @@ export class TabsTitleControl extends TitleControl {
|
|||
}
|
||||
|
||||
protected doRefresh(): void {
|
||||
if (!this.context) {
|
||||
return;
|
||||
}
|
||||
|
||||
const group = this.context;
|
||||
const editor = group.activeEditor;
|
||||
const editor = group && group.activeEditor;
|
||||
if (!editor) {
|
||||
this.clearTabs();
|
||||
|
||||
this.groupActionsToolbar.setActions([], [])();
|
||||
|
||||
this.currentPrimaryGroupActionIds = [];
|
||||
|
@ -249,12 +247,16 @@ export class TabsTitleControl extends TitleControl {
|
|||
this.doUpdate();
|
||||
}
|
||||
|
||||
private refreshTabs(group: IEditorGroup): void {
|
||||
|
||||
// Empty container first
|
||||
private clearTabs(): void {
|
||||
DOM.clearNode(this.tabsContainer);
|
||||
dispose(this.tabDisposeables);
|
||||
this.tabDisposeables = [];
|
||||
}
|
||||
|
||||
private refreshTabs(group: IEditorGroup): void {
|
||||
|
||||
// Empty container first
|
||||
this.clearTabs();
|
||||
|
||||
const tabContainers: HTMLElement[] = [];
|
||||
|
||||
|
|
Loading…
Reference in a new issue