LCL: Prevent DBGrid raising exception after enabled and hiding inplace editor. Issue #37385, patch from Zdravko Gabrovski.

git-svn-id: trunk@63596 -
This commit is contained in:
juha 2020-07-18 21:58:11 +00:00
parent 0b5f33407d
commit 727eb0ef72

View File

@ -7212,7 +7212,8 @@ begin
{$ifdef dbgGrid}DebugLnEnter('grid.DoEditorHide [',Editor.ClassName,'] INIT');{$endif}
if gfEditingDone in FGridFlags then begin
ParentForm := GetParentForm(Self);
ParentForm.ActiveControl := self;
if Self.CanFocus then
ParentForm.ActiveControl := self;
end;
Editor.Visible:=False;
{$ifdef dbgGrid}DebugLnExit('grid.DoEditorHide [',Editor.ClassName,'] END');{$endif}