IDE, DockedFormEditor: Check for csDesignInstance, instead of csDesigning to determine if a form/frame is the top-parent in the designer. (To disable autosizing for them). Issue #41368

(cherry picked from commit 9b4c81b56b)
This commit is contained in:
Martin 2025-01-27 13:09:05 +01:00
parent e0066229c7
commit 8f7ffbe676

View File

@ -3085,7 +3085,7 @@ procedure TControl.DoAllAutoSize;
if not AControl.IsControlVisible then exit;
if Needed and AControl.AutoSize and
(not ((AControl.Parent = nil) and (csDesigning in AControl.ComponentState)))
(not (csDesignInstance in AControl.ComponentState))
then
AControl.DoAutoSize;
if AControl is TWinControl then