From d11223d0e0a0a3e40d2c11e410f99a92bdde778d Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 4 Dec 2019 10:49:16 -0500 Subject: [PATCH] Call ParamQuantity::getDefaultValue() in configParam() to set initial value of param. --- include/engine/Module.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/engine/Module.hpp b/include/engine/Module.hpp index ddcfc8c7..1fa0c910 100644 --- a/include/engine/Module.hpp +++ b/include/engine/Module.hpp @@ -101,9 +101,6 @@ struct Module { if (paramQuantities[paramId]) delete paramQuantities[paramId]; - Param* p = ¶ms[paramId]; - p->value = defaultValue; - ParamQuantity* q = new TParamQuantity; q->module = this; q->paramId = paramId; @@ -116,6 +113,9 @@ struct Module { q->displayMultiplier = displayMultiplier; q->displayOffset = displayOffset; paramQuantities[paramId] = q; + + Param* p = ¶ms[paramId]; + p->value = q->getDefaultValue(); } template