summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qgroupbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qgroupbox.cpp')
-rw-r--r--src/gui/widgets/qgroupbox.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gui/widgets/qgroupbox.cpp b/src/gui/widgets/qgroupbox.cpp
index fe882a6..0bfa8c0 100644
--- a/src/gui/widgets/qgroupbox.cpp
+++ b/src/gui/widgets/qgroupbox.cpp
@@ -644,15 +644,11 @@ bool QGroupBox::isChecked() const
void QGroupBox::setChecked(bool b)
{
Q_D(QGroupBox);
- if (d->checkable) {
- if (d->checked != b)
- update();
- bool wasToggled = (b != d->checked);
+ if (d->checkable && b != d->checked) {
+ update();
d->checked = b;
- if (wasToggled) {
- d->_q_setChildrenEnabled(b);
- emit toggled(b);
- }
+ d->_q_setChildrenEnabled(b);
+ emit toggled(b);
}
}