From f62e7a3b8dbc777f9adb7ae37ed69258767c2521 Mon Sep 17 00:00:00 2001 From: ask Date: Sun, 3 Feb 2013 00:05:35 +0000 Subject: [PATCH] LazFreeType: Call WordBreakHandler only when splitting lines on maximum width git-svn-id: trunk@40133 - --- components/lazutils/easylazfreetype.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/lazutils/easylazfreetype.pas b/components/lazutils/easylazfreetype.pas index 2c6b1a7d8d..592bf8aa1e 100644 --- a/components/lazutils/easylazfreetype.pas +++ b/components/lazutils/easylazfreetype.pas @@ -459,10 +459,6 @@ var begin ARemains:= copy(AText, length(AText) - left + 1 + ADropCount, left); AText := copy(AText, 1, length(AText) - left); - if Assigned(FWordBreakHandler) then - FWordBreakHandler(AText,ARemains) - else - DefaultWordBreakHandler(AText,ARemains); end; begin @@ -497,6 +493,10 @@ begin if (totalWidth > AMaxWidth) and not firstChar then begin WordBreak; + if Assigned(FWordBreakHandler) then + FWordBreakHandler(AText,ARemains) + else + DefaultWordBreakHandler(AText,ARemains); exit; end; end;