Skip to content
Snippets Groups Projects
Commit 38cf3b9b authored by mathias.chouet's avatar mathias.chouet
Browse files

MacroRugoCompound: refresh GUI when new children are generated by "inclined apron" mode

parent bd085077
No related branches found
No related tags found
1 merge request!57WIP: Resolve "Ajout du module "Passe à macro-rugosités complexe""
......@@ -206,6 +206,18 @@ export class FormulaireMacrorugoCompound extends FormulaireBase {
elt.isDisplayed = (! data.value);
}
}
// when switching to multiple aprons, remove all fieldset container
// instances and reinstanciate for every MacroRugo child
if (! data.value) {
for (const elt of this.allFormElements) {
if (elt instanceof FieldsetContainer) {
elt.clearKids();
for (const c of this.mrcNub.children) {
elt.addFromTemplate(0, undefined, c);
}
}
}
}
this.reset();
this.debugMRC();
break;
......
......@@ -90,7 +90,6 @@ export class FieldsetContainer extends FormulaireElement {
const templ: FieldsetTemplate = this._templates[templateIndex];
const inst: FieldSet = templ.instantiateTemplate(this, after, nub);
console.log("INSTANCIATED TEMPLATE (id / parent id)", inst.id, inst.parent.id, inst);
this.updateLocalisation();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment