LCL: constraint Width,Height to >=0

git-svn-id: trunk@36885 -
This commit is contained in:
mattias 2012-04-17 18:41:50 +00:00
parent 080f4f8c22
commit a28add96c2

View File

@ -1328,6 +1328,8 @@ procedure TControl.DoConstrainedResize(var NewLeft, NewTop,
var
MinWidth, MinHeight, MaxWidth, MaxHeight : TConstraintSize;
begin
if NewWidth<0 then NewWidth:=0;
if NewHeight<0 then NewHeight:=0;
MinWidth := Constraints.EffectiveMinWidth;
MinHeight := Constraints.EffectiveMinHeight;
MaxWidth := Constraints.EffectiveMaxWidth;