From 8e038f924e7479404d7bbf47b0422cd45713d435 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 14 Sep 2022 18:40:17 +0200 Subject: [PATCH 1/3] FpDebug: fix typo --- components/fpdebug/fpdbgdarwinclasses.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/fpdebug/fpdbgdarwinclasses.pas b/components/fpdebug/fpdbgdarwinclasses.pas index 2b33748d98..547e06a7d3 100644 --- a/components/fpdebug/fpdbgdarwinclasses.pas +++ b/components/fpdebug/fpdbgdarwinclasses.pas @@ -563,7 +563,7 @@ begin result := FThreadState64.__rsp; end; -procedure TDbgDarwinThread.SetSetInstructionPointerRegisterValue(AValue: TDbgPtr); +procedure TDbgDarwinThread.SetInstructionPointerRegisterValue(AValue: TDbgPtr); begin end; From 6dc31007d1b7d1d541d2ff2cf653ed05387b27bd Mon Sep 17 00:00:00 2001 From: dsiders Date: Wed, 14 Sep 2022 17:52:01 +0100 Subject: [PATCH 2/3] Docs: LCL/stdctrls. Updates content and See Also links for TButtonControl.Click and TCustomCheckBox.Click topics. * Includes suggestions in issue #39892. * Includes suggestions in issue #39893. --- docs/xml/lcl/stdctrls.xml | 53 ++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/docs/xml/lcl/stdctrls.xml b/docs/xml/lcl/stdctrls.xml index 68ae31b680..694fe3f676 100644 --- a/docs/xml/lcl/stdctrls.xml +++ b/docs/xml/lcl/stdctrls.xml @@ -9858,19 +9858,36 @@ Performs actions needed when a click message is handled for the control. Click is an overridden method in TButtonControl. Click calls the DoOnChange method which signals the OnEditingDone and OnChange event handlers (when -assigned). Click calls the inherited method prior to exit. +assigned).

-Click is called when the LM_CLICKED message is handled for the control. It -occurs when click events are not enabled in ControlStyle and -ControlState. +Click calls the inherited method prior to exit. The inherited method (in +TControl) signals either the OnClick event handler or the OnExecute handler +in the Action. OnClick is used when Action has not been assigned, or when +OnClick contains a handler routine that differs from the one assigned to the +OnExecute handler in the Action. +

+

+Click can be called in two different usage scenarios. If standard click +events have been enabled in ControlStyle, it is called when the left mouse +button is released. It can also be called from a private LM_CLICKED message +handler in the control when standard click events are not enabled in +ControlStyle. This avoids a duplicate click notification when csClickEvents +is enabled in ControlStyle and Click is handled when the WMLButtonUp method +is executed.

TControl.Click +TControl.Action TControl.OnEditingDone +TControl.WMLButtonUp +TControl.ControlStyle +TControl.ControlState +LM_CLICKED +TBasicAction.OnExecute @@ -11089,19 +11106,37 @@ handler. Use ClicksDisabled is control the event handler signalled.

Click is an overridden method in TCustomCheckBox. It -ignores mouse up event notifications, and does not call the inherited method. -The click action is performed either in the DoClickOnChange method when the -ClicksDisabled property is False, or when the LM_CLICKED message is -handled for the control and click events are not enabled in ControlStyle and -ControlState. +performs actions needed when the value in the Checked or State property is +changed for the control, whether by mouse click or setting the value in +program code. +

+

+TCustomCheckBox re-implements the method from the TButtonControl ancestor to +ignore the mouse click event. It has an empty implementation, and does not call the inherited method. +

+

+In TCustomCheckBox, the click action may be handled in two different ways. +The action may be performed (in TControl) when the left mouse button is +released and standard click events are enabled in ControlStyle. The click +action may be performed in DoClickOnChange (by calling the inherited Click +method) when the value in State is changed and ClicksDisabled is False. +

+

+This avoids a duplicate click notification when csClickEvents is enabled in +ControlStyle and Click is handled when the WMLButtonUp method is executed, or +when the click is triggered by an associated Action.

+ + TControl.Click +TControl.Action TControl.ControlState TControl.ControlStyle +TControl.WMLButtonUp From e21bc4cd01c424c20fdee9ff67a79cff946bc33f Mon Sep 17 00:00:00 2001 From: wp_xyz Date: Thu, 15 Sep 2022 23:42:57 +0200 Subject: [PATCH 3/3] LCL/DBGrid: Fix memory leak, patch by michalgw, issue #39904. --- lcl/dbgrids.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lcl/dbgrids.pas b/lcl/dbgrids.pas index 4560e77e88..1c56df5fb5 100644 --- a/lcl/dbgrids.pas +++ b/lcl/dbgrids.pas @@ -4630,7 +4630,12 @@ begin FList.Insert(Index, Bookmark); FGrid.Invalidate; end else + begin FDataset.FreeBookmark(Bookmark); + {$ifndef noautomatedbookmark} + SetLength(TBookmark(Bookmark),0); // decrease reference count + {$endif} + end; end; end;