Skip to content

Commit

Permalink
Fix preloading data for interaction variables
Browse files Browse the repository at this point in the history
  • Loading branch information
boutinb committed Oct 18, 2024
1 parent 41e2628 commit b0568e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Common/jaspColumnEncoder
10 changes: 5 additions & 5 deletions QMLComponents/boundcontrols/boundcontrolterms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ void BoundControlTerms::bindTo(const Json::Value &value)
Json::Value newValue = Json::objectValue;
newValue["value"] = valuePart;
newValue["types"] = typesPart;
if (_listView->hasRowComponent() || _listView->containsInteractions())
newValue["optionKey"] = _optionKey;
BoundControlBase::bindTo(newValue);

_termsModel->initTerms(terms, allControlValues);
Expand Down Expand Up @@ -228,8 +226,6 @@ Json::Value BoundControlTerms::createJson() const
}
}



Json::Value result = Json::objectValue;
result["value"] = valuePart;
result["types"] = typesPart;
Expand Down Expand Up @@ -331,8 +327,12 @@ void BoundControlTerms::setBoundValue(const Json::Value &value, bool emitChanges
if (_isValueWithTypes(value))
newValue = value;
else
{
newValue["value"] = value;
newValue["types"] = _getTypes();
newValue["types"] = _getTypes();
}
if (_listView->hasRowComponent() || _listView->containsInteractions())
newValue["optionKey"] = _optionKey;
}

BoundControlBase::setBoundValue(newValue.isNull() ? value : newValue, emitChanges);
Expand Down

0 comments on commit b0568e0

Please sign in to comment.