diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-30 10:11:26 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-30 10:12:51 (GMT) |
commit | 2cdea6a10da75b7b8870f27c432a5e02f7500340 (patch) | |
tree | cb3cf290e42851c45513f052c1b41b96ec6fdc14 /src/gui/kernel/qactiongroup.cpp | |
parent | a5c3cd6d540f282f59c7c5891598ed8f2c6e033f (diff) | |
download | Qt-2cdea6a10da75b7b8870f27c432a5e02f7500340.zip Qt-2cdea6a10da75b7b8870f27c432a5e02f7500340.tar.gz Qt-2cdea6a10da75b7b8870f27c432a5e02f7500340.tar.bz2 |
QActionGroup: reset the checkedAction when it is unchecked
Task-number: QTBUG-1019
Reviewed-by: Gabriel
Diffstat (limited to 'src/gui/kernel/qactiongroup.cpp')
-rw-r--r-- | src/gui/kernel/qactiongroup.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/kernel/qactiongroup.cpp b/src/gui/kernel/qactiongroup.cpp index 40d18a2..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; + } } } |