From 79fc6daa46cd017a51d2f9bed7c24cc7cfc93487 Mon Sep 17 00:00:00 2001 From: Juha Date: Mon, 25 Aug 2025 19:17:42 +0300 Subject: [PATCH] LCL: Prevent removing LCLVersion property when saving a form or frame. Issue #41801. --- lcl/include/customform.inc | 2 +- lcl/include/customframe.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index e00369b79a..0b999aeda8 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -3187,7 +3187,7 @@ end; function TForm.LCLVersionIsStored: boolean; begin - Result:=Parent=nil; + Result := csDesignInstance in ComponentState; end; class procedure TForm.WSRegisterClass; diff --git a/lcl/include/customframe.inc b/lcl/include/customframe.inc index 9dc305a8f4..5ac992ca29 100644 --- a/lcl/include/customframe.inc +++ b/lcl/include/customframe.inc @@ -224,7 +224,7 @@ end; function TFrame.LCLVersionIsStored: boolean; begin - Result := Parent = nil; + Result := csDesignInstance in ComponentState; end; constructor TFrame.Create(TheOwner: TComponent);