mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 20:00:47 +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);
|
||||
kEventControlHitTest:
|
||||
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}
|
||||
DebugLn('CustomControlHandler HitTest');
|
||||
{$ENDIF}
|
||||
@ -1317,6 +1326,7 @@ begin
|
||||
Result := SetEventParameter(AEvent, kEventParamControlPart,
|
||||
typeControlPartCode, SizeOf(Part), @Part);
|
||||
OSError(Result, SName, SSetEvent);
|
||||
}
|
||||
end;
|
||||
end;
|
||||
kEventClassTextInput: Result := noErr;
|
||||
|
Loading…
Reference in New Issue
Block a user