Skip to content

Commit

Permalink
Fix : math filter operation value not saved if filter is disabled on …
Browse files Browse the repository at this point in the history
…load and not re-enabled
  • Loading branch information
Tom Magnier committed Sep 23, 2024
1 parent f89fb97 commit f1d555f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void MathFilter::setupParametersInternal(int multiplexIndex, bool rangeOnly)
operationValue = (Parameter*)ControllableFactory::createControllable(mSourceParams[0]->getTypeString());
operationValue->setNiceName("Value");
if (loadLastData) operationValue->loadJSONData(opValueData);
opValueData = var();
//operationValue->isSavable = false;
filterParams.addParameter(operationValue);
}
Expand Down Expand Up @@ -255,7 +256,10 @@ bool MathFilter::filteredParamShouldHaveRange()
var MathFilter::getJSONData()
{
var data = MappingFilter::getJSONData();
if (operationValue != nullptr) data.getDynamicObject()->setProperty("operationValue", operationValue->getJSONData());
if (operationValue != nullptr)
data.getDynamicObject()->setProperty("operationValue", operationValue->getJSONData());
else if (opValueData.isObject())
data.getDynamicObject()->setProperty("operationValue", opValueData);
return data;
}

Expand Down

0 comments on commit f1d555f

Please sign in to comment.