From ac88513fbf34e603c85043bf2c30142ac9beff72 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Fri, 24 May 2019 10:24:26 +0200
Subject: [PATCH] Fix bug in unsetCalculatedParam()

---
 src/nub.ts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/nub.ts b/src/nub.ts
index 21463a8c..fb195466 100644
--- a/src/nub.ts
+++ b/src/nub.ts
@@ -150,7 +150,10 @@ export abstract class Nub extends ComputeNode implements IObservable {
      */
     public unsetCalculatedParam(except: ParamDefinition) {
         for (const p of this.parameterIterator) {
-            if (p !== except) {
+            if (
+                p.valueMode === ParamValueMode.CALCUL
+                && p !== except
+            ) {
                 p.setValueMode(ParamValueMode.SINGLE, false);
             }
         }
-- 
GitLab