From d4cc390c4511103d4d9e5a34bd093e63a355654f Mon Sep 17 00:00:00 2001 From: ProPuke Date: Thu, 27 Aug 2015 23:45:14 +0100 Subject: [PATCH] fixed: legacy word-wrapped TextFields would sometimes leave an extra empty line below disclaimer: I just pushed buttons and this worked (fixed my test cases). I actually have no idea what I'm doing. --- legacy/project/src/common/TextField.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/legacy/project/src/common/TextField.cpp b/legacy/project/src/common/TextField.cpp index decfeb7e0..5e6e9f242 100644 --- a/legacy/project/src/common/TextField.cpp +++ b/legacy/project/src/common/TextField.cpp @@ -1990,7 +1990,9 @@ void TextField::Layout(const Matrix &inMatrix) line.mCharGroup0 = mCharGroups.size()-1; line.mCharInGroup0 = last->mString.size(); } - charY += line.mMetrics.height; + if ((endsWidthNewLine && multiline) || mLines.empty()){ + charY += line.mMetrics.height; + } mLines.push_back(line); }