Aspects: Update of combo box when changing TriState value

Call SelectionAspect::setValue instead of skipping it and calling
BaseAspect::setValue directly. That takes care of updating the combo box
state.

Amends c8829ff5b3

Change-Id: I55e90459c2b54da09883f746b61b19d46acfdf92
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2022-06-07 10:06:39 +02:00
parent 0b404c9c7a
commit 9ab0510eaf
2 changed files with 2 additions and 1 deletions

View File

@@ -1994,7 +1994,7 @@ TriState TriStateAspect::value() const
void TriStateAspect::setValue(TriState value)
{
BaseAspect::setValue(value.toVariant());
SelectionAspect::setValue(value.toInt());
}
void TriStateAspect::setDefaultValue(TriState value)

View File

@@ -487,6 +487,7 @@ class QTCREATOR_UTILS_EXPORT TriState
public:
TriState() = default;
int toInt() const { return int(m_value); }
QVariant toVariant() const { return int(m_value); }
static TriState fromVariant(const QVariant &variant);