From 011034bb1d4079f947fc11df1e510797d39ab309 Mon Sep 17 00:00:00 2001 From: tombo Date: Wed, 6 Feb 2008 10:14:25 +0000 Subject: [PATCH] LCL carbon: fixed another bug in text layout caching recalculations git-svn-id: trunk@13992 - --- lcl/interfaces/carbon/carbongdiobjects.pp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lcl/interfaces/carbon/carbongdiobjects.pp b/lcl/interfaces/carbon/carbongdiobjects.pp index e4798b0481..80d60fca73 100644 --- a/lcl/interfaces/carbon/carbongdiobjects.pp +++ b/lcl/interfaces/carbon/carbongdiobjects.pp @@ -932,15 +932,14 @@ begin begin FFont.FCachedLayouts[Ord(FText[I])].Apply(ADC); - if I > 1 then - FTextAfter := FTextAfter + Long2Fix(FFont.FCachedLayouts[Ord(FText[I])].GetWidth) - else + if I = 1 then begin FAscent := FFont.FCachedLayouts[Ord(FText[1])].FAscent; FDescent := FFont.FCachedLayouts[Ord(FText[1])].FDescent; FTextBefore := FFont.FCachedLayouts[Ord(FText[1])].FTextBefore; FTextAfter := FTextBefore; end; + FTextAfter := FTextAfter + Long2Fix(FFont.FCachedLayouts[Ord(FText[I])].GetWidth); end; end;