mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-07 03:18:32 +02:00
LCL: Prevent an exception with MouseDown on a Grid which lost focus. Issue #39730, patch by Soner.
This commit is contained in:
parent
eeccdaa7fc
commit
7f199b0d44
@ -6777,7 +6777,8 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
if not Focused and not(csNoFocus in ControlStyle) then begin
|
if not Focused and not(csNoFocus in ControlStyle) then begin
|
||||||
SetFocus;
|
if CanFocus then
|
||||||
|
SetFocus;
|
||||||
if not Focused then begin
|
if not Focused then begin
|
||||||
{$ifDef dbgGrid} DebugLnExit('TCustomGrid.MouseDown EXIT: Focus not allowed'); {$Endif}
|
{$ifDef dbgGrid} DebugLnExit('TCustomGrid.MouseDown EXIT: Focus not allowed'); {$Endif}
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user