From 8393e025242ef82247a9c9153cd01bba130120e2 Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Sun, 30 Jan 2022 14:34:57 +0000 Subject: [PATCH] text boxes: remember to add the original newline characters back in! Fixes https://gitlab.com/kicad/code/kicad/-/issues/10665 --- common/font/font.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/font/font.cpp b/common/font/font.cpp index 325e539dbe..869659dd4e 100644 --- a/common/font/font.cpp +++ b/common/font/font.cpp @@ -473,6 +473,10 @@ void FONT::LinebreakText( wxString& aText, int aColumnWidth, const VECTOR2I& aSi jj++; } + + // Add the newlines back onto the string + if( ii != ( textLines.Count() - 1 ) ) + aText += '\n'; } }