From 7dab09204f899fc54dbd5379bcd76e7d23af831d Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 5 Mar 2019 19:57:36 +0300 Subject: [PATCH] 0030537: Visualization - wrapping text in font text formatter # last row length correction --- src/Font/Font_TextFormatter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Font/Font_TextFormatter.cxx b/src/Font/Font_TextFormatter.cxx index bf10cb2b77..7cbb083e19 100644 --- a/src/Font/Font_TextFormatter.cxx +++ b/src/Font/Font_TextFormatter.cxx @@ -428,7 +428,7 @@ Standard_ShortReal Font_TextFormatter::LineWidth (const Standard_Integer theInde return theIndex == 0 ? myNewLines[0] : myNewLines[theIndex] - myNewLines[theIndex -1]; if (theIndex == myNewLines.Length()) // the last line - return myPen.x() - LineWidth (theIndex - 1); + return theIndex == 0 ? myPen.x() : myPen.x() - myNewLines[theIndex -1]; return 0; } -- 2.39.5