Qt: block QtKey_Space on QRadioButton when it's not child of TRadioGroup.

git-svn-id: trunk@26763 -
This commit is contained in:
zeljko 2010-07-21 10:00:59 +00:00
parent 3d8f047dc7
commit a18bbff0f4

View File

@ -5104,7 +5104,11 @@ function TQtRadioButton.EventFilter(Sender: QObjectH; Event: QEventH): Boolean;
begin
Result := inherited EventFilter(Sender, Event);
if (LCLObject <> nil) and
(QEvent_type(Event) in [QEventMouseButtonPress, QEventMouseButtonRelease])
((QEvent_type(Event) in [QEventMouseButtonPress, QEventMouseButtonRelease])
or
((QEvent_type(Event) in [QEventKeyPress, QEventKeyRelease]) and
(QKeyEvent_key(QKeyEventH(Event)) = QtKey_Space) and
isChecked))
then
Result := not (LCLObject.Parent is TRadioGroup);
end;