From: nds Date: Tue, 5 Mar 2019 10:52:37 +0000 (+0300) Subject: Wrapping functionality in Font_TextFormatter - using direct size of lines container X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=4d964b448aa22b7545d0043cc644449a1dcd85b5;p=occt-copy.git Wrapping functionality in Font_TextFormatter - using direct size of lines container --- 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 } }