summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qactiongroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qactiongroup.cpp')
-rw-r--r--src/gui/kernel/qactiongroup.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gui/kernel/qactiongroup.cpp b/src/gui/kernel/qactiongroup.cpp
index e2f73c7..8db76e4 100644
--- a/src/gui/kernel/qactiongroup.cpp
+++ b/src/gui/kernel/qactiongroup.cpp
@@ -72,10 +72,16 @@ void QActionGroupPrivate::_q_actionChanged()
Q_Q(QActionGroup);
QAction *action = qobject_cast<QAction*>(q->sender());
Q_ASSERT_X(action != 0, "QWidgetGroup::_q_actionChanged", "internal error");
- if(exclusive && action->isChecked() && action != current) {
- if(current)
- current->setChecked(false);
- current = action;
+ if(exclusive) {
+ if (action->isChecked()) {
+ if (action != current) {
+ if(current)
+ current->setChecked(false);
+ current = action;
+ }
+ } else if (action == current) {
+ current = 0;
+ }
}
}
@@ -100,7 +106,7 @@ void QActionGroupPrivate::_q_actionHovered()
\class QActionGroup
\brief The QActionGroup class groups actions together.
- \ingroup application
+ \ingroup mainwindow-classes
In some situations it is useful to group actions together. For
example, if you have a \gui{Left Align} action, a \gui{Right