From 1070bae6f5351853cf02d93bf3c483ba6b2f53f0 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Mon, 9 Sep 2019 09:18:34 +0200
Subject: [PATCH] Linkable params: prevent links to MRC children

---
 src/nub.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/nub.ts b/src/nub.ts
index c4cc3895..c3f36c51 100644
--- a/src/nub.ts
+++ b/src/nub.ts
@@ -1,6 +1,6 @@
 import { CalculatorType, ComputeNode } from "./compute-node";
 import { Dichotomie } from "./dichotomie";
-import { acSection, IParamDefinitionIterator, Pab, ParamDefinition, ParamsEquation,
+import { acSection, IParamDefinitionIterator, MacrorugoCompound, Pab, ParamDefinition, ParamsEquation,
          ParamsEquationArrayIterator, Session, Structure } from "./index";
 import { LinkedValue } from "./linked-value";
 import { ParamCalculability, ParamFamily } from "./param/param-definition";
@@ -580,8 +580,8 @@ export abstract class Nub extends ComputeNode implements IObservable {
             }
         }
 
-        // 3. children Nubs, except for PAB
-        if (! (this instanceof Pab)) {
+        // 3. children Nubs, except for PAB and MRC
+        if (! (this instanceof Pab || this instanceof MacrorugoCompound)) {
             for (const cn of this.getChildren()) {
                 res = res.concat(cn.getLinkableValues(src));
             }
-- 
GitLab