Revert an earlier change in 82b9902b12. The checks are needed.

This commit is contained in:
Juha 2022-03-06 09:09:54 +02:00
parent d921dc84fd
commit a1dca01b66

View File

@ -188,10 +188,10 @@ var
W: TWidth;
begin
W := AValue;
if W < MinWidth then
if (MinWidth > 0) and (W < MinWidth) then
W := MinWidth
else
if W > MaxWidth then
if (MaxWidth > 0) and (W > MaxWidth) then
W := MaxWidth;
if Width = W then Exit; // compare with Width instead of FWidth - FWidth is not updated from the WS automatically
FWidth := W;