Skip to content

Commit 63d761d

Browse files
authored
Fix preloading data for interaction variables (#5710)
1 parent 457e9aa commit 63d761d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

QMLComponents/boundcontrols/boundcontrolterms.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ void BoundControlTerms::bindTo(const Json::Value &value)
159159
Json::Value newValue = Json::objectValue;
160160
newValue["value"] = valuePart;
161161
newValue["types"] = typesPart;
162-
if (_listView->hasRowComponent() || _listView->containsInteractions())
163-
newValue["optionKey"] = _optionKey;
164162
BoundControlBase::bindTo(newValue);
165163

166164
_termsModel->initTerms(terms, allControlValues);
@@ -228,8 +226,6 @@ Json::Value BoundControlTerms::createJson() const
228226
}
229227
}
230228

231-
232-
233229
Json::Value result = Json::objectValue;
234230
result["value"] = valuePart;
235231
result["types"] = typesPart;
@@ -331,8 +327,12 @@ void BoundControlTerms::setBoundValue(const Json::Value &value, bool emitChanges
331327
if (_isValueWithTypes(value))
332328
newValue = value;
333329
else
330+
{
334331
newValue["value"] = value;
335-
newValue["types"] = _getTypes();
332+
newValue["types"] = _getTypes();
333+
}
334+
if (_listView->hasRowComponent() || _listView->containsInteractions())
335+
newValue["optionKey"] = _optionKey;
336336
}
337337

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

0 commit comments

Comments
 (0)