mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 11:38:17 +02:00
lcl: forms: allow changing TCustomForm.DesignTimeDPI in runtime.
git-svn-id: trunk@53510 -
This commit is contained in:
parent
beafafc9a0
commit
2612f8b61e
@ -355,10 +355,11 @@ end;
|
||||
|
||||
procedure TCustomForm.SetDesignTimeDPI(const aDesignTimeDPI: Integer);
|
||||
begin
|
||||
if not (csLoading in ComponentState) then
|
||||
if (csLoading in ComponentState) // allow setting only when loading
|
||||
or not (csDesigning in ComponentState)) then // or in runtime (the programmer has to know why he is doing that)
|
||||
FDesignTimeDPI := aDesignTimeDPI
|
||||
else
|
||||
raise EInvalidOperation.Create(sCannotSetDesignTimeDPI);
|
||||
|
||||
FDesignTimeDPI := aDesignTimeDPI;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user