mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 07:29:25 +02:00
LCL: Exit TCustomSpeedButton.DialogChar silently if Message.Msg <> LM_SYSCHAR.
git-svn-id: trunk@29854 -
This commit is contained in:
parent
4e95f6a390
commit
0313811e63
@ -477,10 +477,9 @@ end;
|
||||
function TCustomSpeedButton.DialogChar(var Message: TLMKey): boolean;
|
||||
begin
|
||||
Result := False;
|
||||
if Message.Msg <> LM_SYSCHAR then
|
||||
DebugLn(Format('*** Warning: Key %d passed to TCustomSpeedButton.DialogChar.'+
|
||||
' Should be LM_SYSCHAR (%d) ***', [Message.Msg, LM_SYSCHAR]));
|
||||
if not FShowAccelChar then Exit;
|
||||
// Sometimes LM_CHAR is received instead of LM_SYSCHAR, maybe intentionally
|
||||
// (LCL handles it) or maybe sent by mistake. In either case exit.
|
||||
if (Message.Msg <> LM_SYSCHAR) or not FShowAccelChar then Exit;
|
||||
if IsAccel(Message.CharCode, Caption) then
|
||||
begin
|
||||
Result := True;
|
||||
|
Loading…
Reference in New Issue
Block a user