[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] misbehaving of KToggleActions in exclusiveGroup
From: Tobias Koenig <tokoe () kde ! org>
Date: 2005-09-27 12:16:19
Message-ID: 20050927121619.GD3070 () ghostdog ! localnet
[Download RAW message or body]
Hi,
when you use several KToggleActions in exclusiveGroup mode and plug
them as KActionList into a menubar the following bug appears:
1) Select a non-selected item -> it's checked and all other items of the
group become unchecked.
2) Select a selected item -> _all_ items (also the selected) becomes
unchecked...
The second shouldn't happen, so the attached patch avoids the toggle
when the action is already checked and in a exclusive group.
Ok to commit to 3.5?
Ciao,
Tobias
--
Separate politics from religion and economy!
The Councile of the European Union is an undemocratic and illegal institution!
["kactionclass_no_toggle_in_exclusivegroup.patch" (text/plain)]
Index: kactionclasses.cpp
===================================================================
--- kactionclasses.cpp (revision 464154)
+++ kactionclasses.cpp (working copy)
@@ -232,6 +232,10 @@
void KToggleAction::slotActivated()
{
+ // don't toggle when already checked and part of exclusive group
+ if ( isChecked() && !exclusiveGroup().isEmpty() )
+ return;
+
setChecked( !isChecked() );
KAction::slotActivated();
emit toggled( isChecked() );
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic