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:
jesus 2014-10-18 23:18:48 +00:00
parent 4b9c851211
commit 885a085db5

View File

@ -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;