From 29ac6380ba649e30dc29771b2833a86f20c9dbfe Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 1 Aug 2012 19:13:31 +0100 Subject: [PATCH] Prevent newlines being inserted into the begining of a multiline label/textbox --- src/interface/Label.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp index fd910865c..4be7fb77a 100644 --- a/src/interface/Label.cpp +++ b/src/interface/Label.cpp @@ -71,8 +71,11 @@ void Label::updateMultiline() if(width+currentWidth > Size.X-6) { currentWidth = width; - currentWord[0] = '\n'; - lines++; + if(currentWord!=rawText) + { + currentWord[0] = '\n'; + lines++; + } } else currentWidth += width;