Skip to content

Commit

Permalink
fixes #106083
Browse files Browse the repository at this point in the history
  • Loading branch information
sbatten committed Oct 26, 2020
1 parent ba1b6a7 commit c2337d8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/vs/workbench/browser/parts/compositePart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,14 @@ export abstract class CompositePart<T extends Composite> extends Part {
}

protected onTitleAreaUpdate(compositeId: string): void {
// Title
const composite = this.instantiatedCompositeItems.get(compositeId);
if (composite) {
this.updateTitle(compositeId, composite.composite.getTitle());
}

// Active Composite
if (this.activeComposite && this.activeComposite.getId() === compositeId) {

// Title
this.updateTitle(this.activeComposite.getId(), this.activeComposite.getTitle());

// Actions
const actionsBinding = this.collectCompositeActions(this.activeComposite);
this.mapActionsBindingToComposite.set(this.activeComposite.getId(), actionsBinding);
Expand Down Expand Up @@ -412,9 +413,12 @@ export abstract class CompositePart<T extends Composite> extends Part {

const $this = this;
return {
updateTitle: (_id, title, keybinding) => {
titleLabel.innerText = title;
titleLabel.title = keybinding ? nls.localize('titleTooltip', "{0} ({1})", title, keybinding) : title;
updateTitle: (id, title, keybinding) => {
// The title label is shared for all composites in the base CompositePart
if (!this.activeComposite || this.activeComposite.getId() === id) {
titleLabel.innerText = title;
titleLabel.title = keybinding ? nls.localize('titleTooltip', "{0} ({1})", title, keybinding) : title;
}
},

updateStyles: () => {
Expand Down

0 comments on commit c2337d8

Please sign in to comment.