wordwrap fix

This commit is contained in:
Honfika
2014-03-05 00:06:13 +01:00
parent f6e5680f49
commit 269982f864

View File

@@ -829,10 +829,12 @@ public class DefineEditTextTag extends TextTag {
for (Word word : paragraph.words) {
if (lineLength + word.width <= bounds.getWidth()) {
line.addAll(word.records);
lineLength += word.width;
} else {
lines.add(line);
line = new ArrayList<>();
line.addAll(word.records);
lineLength = 0;
}
}
if (!line.isEmpty()) {