Skip to content

Commit

Permalink
Fix #52105
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Sep 11, 2018
1 parent 6ae5863 commit b3b5447
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,9 @@ class SideBySidePreferencesWidget extends Widget {
private lastFocusedEditor: BaseEditor;
private splitview: SplitView;

private isVisible: boolean;
private group: IEditorGroup;

get minimumWidth(): number { return this.splitview.minimumSize; }
get maximumWidth(): number { return this.splitview.maximumSize; }

Expand Down Expand Up @@ -899,11 +902,14 @@ class SideBySidePreferencesWidget extends Widget {
}

public setEditorVisible(visible: boolean, group: IEditorGroup): void {
this.isVisible = visible;
this.group = group;

if (this.defaultPreferencesEditor) {
this.defaultPreferencesEditor.setVisible(visible, group);
this.defaultPreferencesEditor.setVisible(this.isVisible, this.group);
}
if (this.editablePreferencesEditor) {
this.editablePreferencesEditor.setVisible(visible, group);
this.editablePreferencesEditor.setVisible(this.isVisible, this.group);
}
}

Expand All @@ -915,6 +921,7 @@ class SideBySidePreferencesWidget extends Widget {
const editor = descriptor.instantiate(this.instantiationService);
this.editablePreferencesEditor = editor;
this.editablePreferencesEditor.create(this.editablePreferencesEditorContainer);
this.editablePreferencesEditor.setVisible(this.isVisible, this.group);
(<CodeEditorWidget>this.editablePreferencesEditor.getControl()).onDidFocusEditorWidget(() => this.lastFocusedEditor = this.editablePreferencesEditor);
this.lastFocusedEditor = this.editablePreferencesEditor;
this.layout();
Expand Down

0 comments on commit b3b5447

Please sign in to comment.