提交 5cd6e6ed 编写于 作者: B Benjamin Pasero

less hectic title udpates when reordering editors

上级 af64e5c6
......@@ -134,7 +134,7 @@ export class NoTabsTitleControl extends TitleControl {
return DOM.isAncestor(target, this.editorActionsToolbar.getContainer().getHTMLElement());
}
protected redraw(): void {
public refresh(): void {
if (!this.context) {
return;
}
......
......@@ -890,6 +890,8 @@ export class SideBySideEditorControl implements ISideBySideEditorControl, IVerti
// Move to valid position if any
if (moveTo !== null) {
this.editorGroupService.moveGroup(position, moveTo);
this.titleAreaControl[position].refresh();
this.titleAreaControl[moveTo].refresh();
}
// Otherwise layout to restore proper positioning
......
......@@ -37,6 +37,7 @@ export interface IToolbarActions {
export interface ITitleAreaControl {
setContext(group: IEditorGroup): void;
create(parent: Builder): void;
refresh(): void;
dispose(): void;
}
......@@ -72,7 +73,7 @@ export abstract class TitleControl {
this.stacks = editorGroupService.getStacksModel();
this.mapActionsToEditors = Object.create(null);
this.scheduler = new RunOnceScheduler(() => this.redraw(), 0);
this.scheduler = new RunOnceScheduler(() => this.refresh(), 0);
this.toDispose.push(this.scheduler);
this.initActions();
......@@ -84,7 +85,7 @@ export abstract class TitleControl {
this.scheduler.schedule();
}
protected abstract redraw();
public abstract refresh();
private initActions(): void {
this.closeEditorAction = this.instantiationService.createInstance(CloseEditorAction, CloseEditorAction.ID, nls.localize('close', "Close"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册