From cd3e9f967c08ca36a7bdeb32add84dc7d7c4f6e8 Mon Sep 17 00:00:00 2001 From: Jean-Pascal <jean-pascal.aubry@inrae.fr> Date: Tue, 23 Jan 2024 16:07:34 +0000 Subject: [PATCH] fix: display the right bottom slope value when a parametric section is generated Refs #654 --- src/app/services/formulaire.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/services/formulaire.service.ts b/src/app/services/formulaire.service.ts index 7e139665b..9053c30d5 100644 --- a/src/app/services/formulaire.service.ts +++ b/src/app/services/formulaire.service.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/member-ordering */ import { Injectable } from "@angular/core"; import { decode } from "he"; @@ -872,8 +873,12 @@ export class FormulaireService extends Observable { if (this.currentForm.currentNub instanceof SectionNub) { const sn: SectionNub = this.currentForm.currentNub; if (sn instanceof RegimeUniforme || sn instanceof CourbeRemous) { + // change _If visibility to copy section + sn.section.prms.If.visible = true; // copy section const serialisedSection = sn.section.serialise(); + // Reinitialize _If visibility + sn.section.prms.If.visible = false; const sectionCopy: acSection = Session.getInstance().unserialiseSingleNub(serialisedSection, false).nub as acSection; if (Y !== undefined) { sectionCopy.prms.Y.singleValue = Y; -- GitLab