summaryrefslogtreecommitdiff
path: root/src/interface/Label.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-01 18:13:31 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-01 18:13:31 (GMT)
commit29ac6380ba649e30dc29771b2833a86f20c9dbfe (patch)
tree857e0e4ab37b9fa88dba792796e55c67ea60dd19 /src/interface/Label.cpp
parent1d258eab6b0ec3740d634f014af5dbff882e0069 (diff)
downloadpowder-29ac6380ba649e30dc29771b2833a86f20c9dbfe.zip
powder-29ac6380ba649e30dc29771b2833a86f20c9dbfe.tar.gz
Prevent newlines being inserted into the begining of a multiline label/textbox
Diffstat (limited to 'src/interface/Label.cpp')
-rw-r--r--src/interface/Label.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp
index fd91086..4be7fb7 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;