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,9 +71,12 @@ void Label::updateMultiline()
if(width+currentWidth > Size.X-6) if(width+currentWidth > Size.X-6)
{ {
currentWidth = width; currentWidth = width;
if(currentWord!=rawText)
{
currentWord[0] = '\n'; currentWord[0] = '\n';
lines++; lines++;
} }
}
else else
currentWidth += width; currentWidth += width;
if(nextSpace) if(nextSpace)