mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 15:42:08 +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;
|
function TCustomSpeedButton.DialogChar(var Message: TLMKey): boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
if Message.Msg <> LM_SYSCHAR then
|
// Sometimes LM_CHAR is received instead of LM_SYSCHAR, maybe intentionally
|
||||||
DebugLn(Format('*** Warning: Key %d passed to TCustomSpeedButton.DialogChar.'+
|
// (LCL handles it) or maybe sent by mistake. In either case exit.
|
||||||
' Should be LM_SYSCHAR (%d) ***', [Message.Msg, LM_SYSCHAR]));
|
if (Message.Msg <> LM_SYSCHAR) or not FShowAccelChar then Exit;
|
||||||
if not FShowAccelChar then Exit;
|
|
||||||
if IsAccel(Message.CharCode, Caption) then
|
if IsAccel(Message.CharCode, Caption) then
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
Loading…
Reference in New Issue
Block a user