From 16c47fba393dde7d81dd9ef93be4c366679f93d4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 1 Dec 2016 16:58:37 +0100 Subject: [PATCH] Title Bar Actions Not Refreshed In Some Scenarios (fixes #16298) --- src/vs/workbench/browser/parts/editor/titleControl.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 26b01ca287f..045f68d3e26 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -36,7 +36,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { CloseEditorsInGroupAction, SplitEditorAction, CloseEditorAction, KeepEditorAction, CloseOtherEditorsInGroupAction, CloseRightEditorsInGroupAction, ShowEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { createActionItem, fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; -import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; +import { IMenuService, MenuId, IMenu, ExecuteCommandAction } from 'vs/platform/actions/common/actions'; import { ResourceContextKey } from 'vs/workbench/common/resourceContextKey'; export interface IToolbarActions { @@ -399,7 +399,12 @@ export abstract class TitleControl implements ITitleAreaControl { const secondaryEditorActionIds = secondaryEditorActions.map(a => a.id); - if (!arrays.equals(primaryEditorActionIds, this.currentPrimaryEditorActionIds) || !arrays.equals(secondaryEditorActionIds, this.currentSecondaryEditorActionIds)) { + if ( + !arrays.equals(primaryEditorActionIds, this.currentPrimaryEditorActionIds) || + !arrays.equals(secondaryEditorActionIds, this.currentSecondaryEditorActionIds) || + primaryEditorActions.some(action => action instanceof ExecuteCommandAction) || // execute command actions can have the same ID but different arguments + secondaryEditorActions.some(action => action instanceof ExecuteCommandAction) // see also https://github.com/Microsoft/vscode/issues/16298 + ) { this.editorActionsToolbar.setActions(primaryEditorActions, secondaryEditorActions)(); if (!this.showTabs) { -- GitLab