Skip to content
Snippets Groups Projects
Commit d8309e8e authored by francois.grand's avatar francois.grand
Browse files

Paramètre fixé/à varier/à calculer : correction d'un bug ne laissant aucun...

Paramètre fixé/à varier/à calculer : correction d'un bug ne laissant aucun paramètre à calculer quand on passe le paramètre par défaut de "à calculer" à "varier" ou "fixé"
parent b3c77bfc
No related branches found
No related tags found
1 merge request!2Resolve "Ajout de la calculette "Passe à bassins : Dimensions""
......@@ -323,6 +323,23 @@ export class FormulaireDefinition {
sourceParam.radioState = newState;
// on vérifie qu'il y a au moins un paramètre "à calculer" et sinon, on prend le 1er qui est à "fixé"
if (this.getParamFromState(ParamRadioConfig.CAL) == undefined) {
let newCal: NgParameter = undefined;
for (let fs of this._fieldSets) {
for (let p of fs.fields) {
if (p instanceof NgParameter)
if (p.radioState == ParamRadioConfig.FIX && p != sourceParam) {
newCal = p;
break;
}
}
}
newCal.radioState = ParamRadioConfig.CAL;
}
this.resetResults();
this.applyDependencies();
}
......
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