Skip to content

Commit

Permalink
Settings editor - fix measuring items with wrong template
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Jun 24, 2018
1 parent 74ccd2d commit 3846925
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vs/workbench/parts/preferences/browser/settingsTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3846925

Please sign in to comment.