diff --git a/components/callite/source/calendarlite.pas b/components/callite/source/calendarlite.pas index c2a14aea5..fa7cc02d8 100644 --- a/components/callite/source/calendarlite.pas +++ b/components/callite/source/calendarlite.pas @@ -504,6 +504,12 @@ const DESIGNTIME_PPI = 96; +function SameRect(const R1, R2: TRect): Boolean; +begin + Result := (R1.Left = R2.Left) and (R1.Top = R2.Top) and + (R1.Right = R2.Right) and (R1.Bottom = R2.Bottom); +end; + { Holiday helpers } { Clears the per month holiday buffer } @@ -1395,7 +1401,7 @@ end; procedure TCalDrawer.SetBoundsRect(ARect: TRect); begin - if FBoundsRect = ARect then exit; + if SameRect(FBoundsRect, ARect) then exit; FBoundsRect := ARect; FBuffer.SetSize(FBoundsRect.Width, FBoundsRect.Height); Draw;