From c00cb12cca382e57035586b67838feb44538e0ef Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 18 Feb 2021 01:00:29 +0000 Subject: [PATCH] Merged revision(s) 63596 #727eb0ef72, 63627 #4fde982e86 from trunk: LCL: Prevent DBGrid raising exception after enabled and hiding inplace editor. Issue #37385, patch from Zdravko Gabrovski. ........ Codetools: Find form's ancestor also when a generic form is specialized. Issue #37396, patch from Imants Gulbis. ........ git-svn-id: branches/fixes_2_0@64608 - --- components/codetools/stdcodetools.pas | 2 ++ lcl/grids.pas | 1 + 2 files changed, 3 insertions(+) diff --git a/components/codetools/stdcodetools.pas b/components/codetools/stdcodetools.pas index dadd22a2f6..8624944766 100644 --- a/components/codetools/stdcodetools.pas +++ b/components/codetools/stdcodetools.pas @@ -3113,6 +3113,8 @@ begin ReadNextAtom; if AtomIsChar('(') then begin ReadNextAtom; + if UpAtomIs('SPECIALIZE') then + ReadNextAtom; if AtomIsIdentifier then AncestorClassName:=GetAtom; end; diff --git a/lcl/grids.pas b/lcl/grids.pas index 37914e2868..24c62c6fc6 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -7079,6 +7079,7 @@ begin {$ifdef dbgGrid}DebugLnEnter('grid.DoEditorHide [',Editor.ClassName,'] INIT');{$endif} if gfEditingDone in FGridFlags then begin ParentForm := GetParentForm(Self); + if Self.CanFocus then ParentForm.ActiveControl := self; end; Editor.Visible:=False;