提交 93b53a52 编写于 作者: B Benjamin Pasero

Closing all files in a group except for a markdown file does not update...

Closing all files in a group except for a markdown file does not update overflow control icon (fixes #6795)
上级 ac05a75f
......@@ -483,7 +483,7 @@ export class EditorPart extends Part implements IEditorPart {
this.doCloseActiveEditor(group, focusNext);
}
// Closing inactive editor is just a model update
// Closing inactive editor is just a model and title update
else {
this.doCloseInactiveEditor(group, input);
}
......@@ -510,6 +510,9 @@ export class EditorPart extends Part implements IEditorPart {
// Closing inactive editor is just a model update
group.closeEditor(input);
// Update UI
this.sideBySideControl.updateTitleArea({ position: this.stacks.positionOfGroup(group), preview: group.previewEditor, editorCount: group.count });
}
private doCloseGroup(group: EditorGroup): void {
......@@ -628,6 +631,9 @@ export class EditorPart extends Part implements IEditorPart {
// Update stacks model: close non active editors supporting the direction
group.closeEditors(group.activeEditor, direction);
// Update UI
this.sideBySideControl.updateTitleArea({ position: this.stacks.positionOfGroup(group), preview: group.previewEditor, editorCount: group.count });
}
// Finally: we are asked to close editors around a non-active editor
......
......@@ -1200,12 +1200,23 @@ export class SideBySideEditorControl implements ISideBySideEditorControl, IVerti
let input = editor ? editor.input : null;
if (input && editor) {
// Pinned
const isPinned = !input.matches(state.preview);
if (isPinned) {
this.titleContainer[state.position].addClass('pinned');
} else {
this.titleContainer[state.position].removeClass('pinned');
}
// Overflow
const isOverflowing = state.editorCount > 1;
const showEditorAction = this.showEditorsOfGroup[state.position];
if (isOverflowing) {
showEditorAction.class = 'show-group-editors-overflowing-action';
} else {
showEditorAction.class = 'show-group-editors-action';
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册