LCL: reduce calls of PopupMenu property getter. issue #23336

git-svn-id: trunk@39973 -
This commit is contained in:
zeljko 2013-01-27 08:06:15 +00:00
parent d2484b1951
commit 28b4ed797c

View File

@ -5624,10 +5624,12 @@ function TWinControl.DoKeyDownBeforeInterface(var Message: TLMKey; IsRecurseCall
function IsShortCut: Boolean;
var
AParent: TWinControl;
APopupMenu: TPopupMenu;
begin
Result := False;
// check popup menu
if Assigned(PopupMenu) and PopupMenu.IsShortCut(Message) then
APopupMenu := PopupMenu;
if Assigned(APopupMenu) and APopupMenu.IsShortCut(Message) then
Exit(True);
if IsRecurseCall then