From 4d964b448aa22b7545d0043cc644449a1dcd85b5 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 5 Mar 2019 13:52:37 +0300 Subject: [PATCH] Wrapping functionality in Font_TextFormatter - using direct size of lines container --- src/Font/Font_TextFormatter.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Font/Font_TextFormatter.cxx b/src/Font/Font_TextFormatter.cxx index 5db02b09ea..108b93fc7e 100644 --- a/src/Font/Font_TextFormatter.cxx +++ b/src/Font/Font_TextFormatter.cxx @@ -237,8 +237,9 @@ void Font_TextFormatter::Format() aMaxLineWidth = myPen.x(); else { - for (int aLineIt = 0; aLineIt < myLinesNb; aLineIt++) + for (int aLineIt = 0; aLineIt < myNewLines.Size(); aLineIt++) aMaxLineWidth = Max (aMaxLineWidth, LineWidth (aLineIt)); + aMaxLineWidth = Max (aMaxLineWidth, LineWidth (myNewLines.Size())); // processing the last line also } } -- 2.39.5