Commit cc93de0d authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Résultat à l'écran: évite d'ajouter plusieurs fois les paramètres fixés

Showing with 3 additions and 1 deletion
+3 -1
......@@ -54,6 +54,7 @@ export class FormComputeFixedVar extends FormCompute {
protected reaffectResultComponents() {
const nub: Nub = this._formBase.currentNub;
const computedParam: NgParameter = this.getComputedParameter();
this.formResult.resetResults(); // to avoid adding fixed parameters more than once (see below)
this.formResult.addFixedParameters();
const varParam: NgParameter = this.getVariatedParameter();
......
......@@ -27,7 +27,8 @@ export abstract class FormCompute implements Observer {
/**
* Copies current Nub result into result components for display on page.
* Should be called every time the Nub result changes
* Should be called every time the Nub result changes.
* Must be idempotent.
*/
protected abstract reaffectResultComponents();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment