Utils: Fix manual apply of BoolAspects

Amends b7acf45c1. The primary connection was already there, and
correctly if'd, and the patch added accidentally a second connection
which was harmless in the auto-apply case, but effectively made the
manual-apply case also auto-apply.

Change-Id: I5ee72ff4715fb0077a47f71e8d45a5b6251c4121
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-03-17 13:08:45 +01:00
parent e18134a2bd
commit 9602338ce8

View File

@@ -1225,9 +1225,6 @@ void BoolAspect::addToLayout(LayoutBuilder &builder)
break; break;
} }
d->m_checkBox->setChecked(value()); d->m_checkBox->setChecked(value());
connect(d->m_checkBox.data(), &QAbstractButton::clicked, this, [this] {
setValue(d->m_checkBox->isChecked());
});
if (isAutoApply()) { if (isAutoApply()) {
connect(d->m_checkBox.data(), &QAbstractButton::clicked, connect(d->m_checkBox.data(), &QAbstractButton::clicked,
this, [this](bool val) { setValue(val); }); this, [this](bool val) { setValue(val); });