mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 19:00:27 +02:00
LCL, fix grids mouse selecting at cells borders on grids with always show editor option, last part of issue #22542
git-svn-id: trunk@46601 -
This commit is contained in:
parent
4b9c851211
commit
885a085db5
@ -1308,6 +1308,15 @@ begin
|
|||||||
kEventControlSetFocusPart: Result := CallNextEventHandler(ANextHandler, AEvent);
|
kEventControlSetFocusPart: Result := CallNextEventHandler(ANextHandler, AEvent);
|
||||||
kEventControlHitTest:
|
kEventControlHitTest:
|
||||||
begin
|
begin
|
||||||
|
Result := CallNextEventHandler(ANextHandler, AEvent);
|
||||||
|
{
|
||||||
|
// I was not able to find what for is this workaround (r11394)
|
||||||
|
// returning kControlEditTextPart for any customcontrol looks strange
|
||||||
|
// It seems to interfer with what widget really hit the mouse click.
|
||||||
|
//
|
||||||
|
// But it breaks grid's mouse selecting when clicking (near) at
|
||||||
|
// the borders of cells on an always show editor grid.
|
||||||
|
//
|
||||||
{$IFDEF VerboseMouse}
|
{$IFDEF VerboseMouse}
|
||||||
DebugLn('CustomControlHandler HitTest');
|
DebugLn('CustomControlHandler HitTest');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -1317,6 +1326,7 @@ begin
|
|||||||
Result := SetEventParameter(AEvent, kEventParamControlPart,
|
Result := SetEventParameter(AEvent, kEventParamControlPart,
|
||||||
typeControlPartCode, SizeOf(Part), @Part);
|
typeControlPartCode, SizeOf(Part), @Part);
|
||||||
OSError(Result, SName, SSetEvent);
|
OSError(Result, SName, SSetEvent);
|
||||||
|
}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
kEventClassTextInput: Result := noErr;
|
kEventClassTextInput: Result := noErr;
|
||||||
|
Loading…
Reference in New Issue
Block a user