cocoa: only checking for the removing of the Mixed (gray) status from the checkbox, when space is being pressed

git-svn-id: trunk@58748 -
This commit is contained in:
dmitry 2018-08-21 02:00:48 +00:00
parent 5e3a683299
commit 6989fa68c2

View File

@ -231,10 +231,16 @@ begin
end;
procedure TCocoaButton.keyDown(event: NSEvent);
const
KeyCode_Space = 49;
begin
lclCheckMixedAllowance;
if not Assigned(callback) or not callback.KeyEvent(event) then
begin
// space would attempt to change checked status
if event.keyCode = KeyCode_Space then
lclCheckMixedAllowance;
inherited keyDown(event);
end;
end;
procedure TCocoaButton.keyUp(event: NSEvent);