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

Fix nghyd#285

Showing with 4 additions and 5 deletions
+4 -5
......@@ -52,7 +52,6 @@ export abstract class Nub extends ComputeNode implements IObservable {
* (used by CalcSerie with varying parameters)
*/
protected set currentResult(r: Result) {
// this.setCurrentResult(r);
if (! this._result) {
this.initNewResultElement();
}
......
......@@ -19,7 +19,7 @@ export class StructureRectangularOrificeFree extends RectangularStructure {
}
public Calc(sVarCalc: string, rInit?: number): Result {
this._result = super.Calc(sVarCalc, rInit);
this.currentResult = super.Calc(sVarCalc, rInit);
if (this.prms.h2.v > 0) {
this._result.resultElement.addMessage(new Message(
MessageCode.WARNING_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION,
......
......@@ -17,7 +17,7 @@ export class StructureWeirFree extends RectangularStructure {
}
public Calc(sVarCalc: string, rInit?: number): Result {
this._result = super.Calc(sVarCalc, rInit);
this.currentResult = super.Calc(sVarCalc, rInit);
// do not check h2 for derived classes (ex: StructureWeirVillemonte)
if (this._loiDebit === LoiDebit.WeirFree && this.prms.h2.v > 0) {
this._result.resultElement.addMessage(new Message(
......
......@@ -26,7 +26,7 @@ export class StructureWeirSubmergedLarinier extends RectangularStructure {
}
public Calc(sVarCalc: string, rInit?: number): Result {
this._result = super.Calc(sVarCalc, rInit);
this.currentResult = super.Calc(sVarCalc, rInit);
const h2h1ratio = this.prms.h2.v / this.prms.h1.v;
if (h2h1ratio < 0.7 || h2h1ratio > 0.9) {
this._result.resultElement.addMessage(new Message(
......
......@@ -14,7 +14,7 @@ export class StructureWeirVillemonte extends StructureWeirFree {
}
public Calc(sVarCalc: string, rInit?: number): Result {
this._result = super.Calc(sVarCalc, rInit);
this.currentResult = super.Calc(sVarCalc, rInit);
if ((this.prms.h2.v / this.prms.h1.v) > 0.7) {
this._result.resultElement.addMessage(new Message(
MessageCode.WARNING_NOTCH_SUBMERSION_GREATER_THAN_07,
......
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