[fpc-devel] TRect.setWidth and setHeight are shifted

Ondrej Pokorny lazarus at kluug.net
Fri Jan 29 21:14:45 CET 2016


Mantis is down and I want to get rid of this patch so that I can work on 
other things.

The implementation of TRect.setWidth and setHeight is shifted.

Ondrej
-------------- next part --------------
Index: rtl/inc/typshrd.inc
===================================================================
--- rtl/inc/typshrd.inc	(revision 33029)
+++ rtl/inc/typshrd.inc	(working copy)
@@ -366,7 +366,7 @@
 
 procedure TRect.setHeight(AValue: Longint);
 begin
-  right:=left+avalue;
+  bottom:=top+avalue;
 end;
 
 procedure TRect.SetLocation(X, Y: Longint);
@@ -387,7 +387,7 @@
 
 procedure TRect.setWidth(AValue: Longint);
 begin
-  bottom:=top+avalue;
+  right:=left+avalue;
 end;
 
 function TRect.SplitRect(SplitType: TSplitRectType; Percent: Double): TRect;


More information about the fpc-devel mailing list