Fix configured deprecated settings not showing up (#242521)

This commit is contained in:
Raymond Zhao
2025-03-03 15:27:44 -08:00
committed by GitHub
parent 8d7af77957
commit 2f30ffde1e
2 changed files with 10 additions and 3 deletions

View File

@@ -1540,9 +1540,11 @@ export class SettingsEditor2 extends EditorPane {
private refreshSingleElement(element: SettingsTreeSettingElement): void { private refreshSingleElement(element: SettingsTreeSettingElement): void {
if (this.isVisible()) { if (this.isVisible()) {
if (!element.setting.deprecationMessage || element.isConfigured) {
this.settingsTree.rerender(element); this.settingsTree.rerender(element);
} }
} }
}
private refreshTree(): void { private refreshTree(): void {
if (this.isVisible() && this.currentSettingsModel) { if (this.isVisible() && this.currentSettingsModel) {

View File

@@ -596,13 +596,18 @@ export class SettingsTreeModel implements IDisposable {
if (tocEntry.settings) { if (tocEntry.settings) {
const settingChildren = tocEntry.settings.map(s => this.createSettingsTreeSettingElement(s, element)); const settingChildren = tocEntry.settings.map(s => this.createSettingsTreeSettingElement(s, element));
for (const child of settingChildren) { for (const child of settingChildren) {
if (!child.setting.deprecationMessage || child.isConfigured) { if (!child.setting.deprecationMessage) {
children.push(child);
} else {
child.inspectSelf();
if (child.isConfigured) {
children.push(child); children.push(child);
} else { } else {
child.dispose(); child.dispose();
} }
} }
} }
}
if (tocEntry.children) { if (tocEntry.children) {
const groupChildren = tocEntry.children.map(child => this.createSettingsTreeGroupElement(child, element)); const groupChildren = tocEntry.children.map(child => this.createSettingsTreeGroupElement(child, element));