From 033ac52081514a193f63a3d1d35dde2e109e4221 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Mon, 25 Nov 2019 11:37:41 +0100
Subject: [PATCH] Fix #327 - water levels on Remous chart

---
 .../definition/form-compute-courbe-remous.ts          | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/app/formulaire/definition/form-compute-courbe-remous.ts b/src/app/formulaire/definition/form-compute-courbe-remous.ts
index 2a837d31a..a4cff1cbd 100644
--- a/src/app/formulaire/definition/form-compute-courbe-remous.ts
+++ b/src/app/formulaire/definition/form-compute-courbe-remous.ts
@@ -21,12 +21,6 @@ export class FormComputeCourbeRemous extends FormCompute {
     }
 
     protected compute() {
-        const cr: CourbeRemous = this._formBase.currentNub as CourbeRemous;
-        const sect: acSection = cr.Sn;
-
-        this.resultYn = sect.CalcSection("Yn"); // hauteur normale
-        this.resultYc = sect.CalcSection("Yc"); // hauteur critique
-
         this.reaffectResultComponents();
     }
 
@@ -40,9 +34,12 @@ export class FormComputeCourbeRemous extends FormCompute {
         this.remousResults.extraParamSymbol = this._formBase.currentNub.properties.getPropValue("varCalc");
 
         // calcul
-        // this.remousResults.result = cr.calculRemous(this.remousResults.extraParamSymbol);
         this.remousResults.result = cr.CalcSerie();
 
+        const sect: acSection = cr.Sn;
+        this.resultYn = sect.CalcSection("Yn"); // hauteur normale
+        this.resultYc = sect.CalcSection("Yc"); // hauteur critique
+
         // données du graphe
         this.remousResults.hauteurNormale = this.resultYn.resultElement;
         this.remousResults.hauteurCritique = this.resultYc.resultElement;
-- 
GitLab