mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 07:30:22 +02:00
LazFreeType: Call WordBreakHandler only when splitting lines on maximum width
git-svn-id: trunk@40133 -
This commit is contained in:
parent
640bfca4a6
commit
f62e7a3b8d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user