From e90595ffcc3c5f83bac28cc3a50e4f248f8ea248 Mon Sep 17 00:00:00 2001 From: jesus Date: Wed, 12 Aug 2009 18:52:17 +0000 Subject: [PATCH] LazReport, fix designer freeze when using Help context button, issue #14262 git-svn-id: trunk@21206 - --- components/lazreport/source/lr_desgn.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/lazreport/source/lr_desgn.pas b/components/lazreport/source/lr_desgn.pas index e5b2ab4ffb..ee37d808f6 100644 --- a/components/lazreport/source/lr_desgn.pas +++ b/components/lazreport/source/lr_desgn.pas @@ -6002,7 +6002,7 @@ procedure TfrDesignerForm.HelpBtnClick(Sender: TObject); begin HelpBtn.Down := True; Screen.Cursor := crHelp; - SetCapture(Handle); + SetCaptureControl(Self); //** THackBtn(HelpBtn).FMouseInControl := False; HelpBtn.Invalidate; end; @@ -6013,9 +6013,11 @@ var c: TControl; t: Integer; begin + if HelpBtn.Down and (GetCaptureControl=Self) then + SetCaptureControl(nil); HelpBtn.Down := False; Screen.Cursor := crDefault; - c := frControlAtPos(Self, Point(X, Y)); + c := FindControlAtPosition(Mouse.CursorPos, true); if (c <> nil) and (c <> HelpBtn) then begin t := c.Tag; @@ -6024,6 +6026,7 @@ begin if c.Parent = Panel4 then Inc(t, 430) else Inc(t, 400); + //DebugLn('TODO: HelpContext for tag=%d',[t]); //** Application.HelpCommand(HELP_CONTEXTPOPUP, t); end; end;