mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 00:02:50 +02:00
LCL: Do not throw error inside SetActiveControl if we are embedded designer. issue #40833
(cherry picked from commit 34eace3587
)
Co-authored-by: Željan Rikalo <zeljko@lazarus-ide.org>
This commit is contained in:
parent
246652ca2a
commit
57e2fc3852
@ -1860,7 +1860,7 @@ begin
|
||||
// this form can focus => do some sanity checks and raise an exception to
|
||||
// to help programmers to understand why a control is not focused
|
||||
if (AWinControl = Self) or
|
||||
(GetParentForm(AWinControl) <> Self) or
|
||||
(GetParentForm(AWinControl, FDesigner = nil) <> Self) or
|
||||
not ((csLoading in ComponentState) or AWinControl.CanFocus) then
|
||||
begin
|
||||
DebugLn(['TCustomForm.SetActiveControl ',DbgSName(Self),' AWinControl=',DbgSName(AWinControl),' GetParentForm(AWinControl)=',
|
||||
|
Loading…
Reference in New Issue
Block a user