Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-11

ObjectInspector horizontal resize bug

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sandro Cumerlato

Please review attached patch.

- selected edit control doesn't resize properly after a horizontal resize.

Apply if OK, thanx.

Sandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141123/645a78a5/attachment.html> -------------- next part --------------
Index: components/ideintf/objectinspector.pp
=================================================================== --- components/ideintf/objectinspector.pp (revisione 46974) +++ components/ideintf/objectinspector.pp (copia locale) @@ -2586,11 +2586,6 @@

           and (r1.Right=r2.Right) and (r1.Bottom=r2.Bottom);
   end;
-  function CompareTopLeft(r1,r2:TRect):boolean;
-  begin
-    Result := (r1.Left=r2.Left) and (r1.Top=r2.Top);
-  end;
-
 // AlignEditComponents
 begin
   if ItemIndex>=0 then
@@ -2630,7 +2625,7 @@
         Inc(EditCompRect.Bottom);
       end;
       //debugln('TOICustomPropertyGrid.AlignEditComponents A ',dbgsName(FCurrentEdit),' ',dbgs(EditCompRect));
-      if not CompareTopLeft(FCurrentEdit.BoundsRect,EditCompRect) then
+      if not CompareRectangles(FCurrentEdit.BoundsRect,EditCompRect) then
       begin
         FCurrentEdit.BoundsRect:=EditCompRect;
         FCurrentEdit.Invalidate;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oi_horizontal_resize_bug.png
Type: image/png
Size: 2370 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141123/645a78a5/attachment.png>

Reply by email