From c74b232d9a9482256083ed9c9637730c74cc775f Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 9 Oct 2024 10:57:38 +0200 Subject: [PATCH] ide: designer: use mediator default size only if none given --- ide/customformeditor.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index 7b7a6c6905..f11d0d63da 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -1319,8 +1319,10 @@ var if Mediator<>nil then begin NewSize:=Mediator.GetDefaultSize; - NewWidth:=NewSize.X; - NewHeight:=NewSize.Y; + if NewWidth=0 then + NewWidth:=NewSize.X; + if NewHeight=0 then + NewHeight:=NewSize.Y; end; end;