SynEdit: Fix PopupMenu.PopupComponent issue #19033 (based on patch by August Klein)

git-svn-id: trunk@30101 -
This commit is contained in:
martin 2011-03-31 22:52:42 +00:00
parent fc1fee1693
commit 58328fb3bf

View File

@ -2779,8 +2779,10 @@ begin
finally
DecPaintLock;
end;
if FMouseClickDoPopUp and (PopupMenu <> nil) then
if FMouseClickDoPopUp and (PopupMenu <> nil) then begin
PopupMenu.PopupComponent:=self;
PopupMenu.PopUp;
end;
inherited MouseDown(Button, Shift, X, Y);
LCLIntf.SetFocus(Handle);
@ -3032,8 +3034,10 @@ begin
finally
DecPaintLock;
end;
if FMouseClickDoPopUp and (PopupMenu <> nil) then
if FMouseClickDoPopUp and (PopupMenu <> nil) then begin
PopupMenu.PopupComponent:=self;
PopupMenu.PopUp;
end;
//DebugLn('TCustomSynEdit.MouseUp END Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y);
end;