Prevent newlines being inserted into the begining of a multiline label/textbox

This commit is contained in:
Simon Robertshaw 2012-08-01 19:13:31 +01:00
parent 1d258eab6b
commit 29ac6380ba

View File

@ -71,8 +71,11 @@ void Label::updateMultiline()
if(width+currentWidth > Size.X-6) if(width+currentWidth > Size.X-6)
{ {
currentWidth = width; currentWidth = width;
currentWord[0] = '\n'; if(currentWord!=rawText)
lines++; {
currentWord[0] = '\n';
lines++;
}
} }
else else
currentWidth += width; currentWidth += width;