From 384692556762b9c71c2e5f8c6d3c96b13eb22d19 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 24 Jun 2018 10:47:07 -0700 Subject: [PATCH] Settings editor - fix measuring items with wrong template --- src/vs/workbench/parts/preferences/browser/settingsTree.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/settingsTree.ts b/src/vs/workbench/parts/preferences/browser/settingsTree.ts index 0f34ba836153f..74447236d8188 100644 --- a/src/vs/workbench/parts/preferences/browser/settingsTree.ts +++ b/src/vs/workbench/parts/preferences/browser/settingsTree.ts @@ -455,8 +455,9 @@ export class SettingsRenderer implements IRenderer { private measureSettingElementHeight(tree: ITree, element: SettingsTreeSettingElement): number { const measureHelper = DOM.append(this.measureContainer, $('.setting-measure-helper')); - const template = this.renderSettingTemplate(tree, measureHelper); - this.renderSettingElement(tree, element, template); + const templateId = this.getTemplateId(tree, element); + const template = this.renderTemplate(tree, templateId, measureHelper); + this.renderElement(tree, element, templateId, template); const height = this.measureContainer.offsetHeight; this.measureContainer.removeChild(this.measureContainer.firstChild);