Fix newlines messing up cursor offset.

Fix an uninitialized value in TextEditComponent.
This commit is contained in:
Alec Lofquist 2014-10-18 15:46:14 -05:00
parent 885efcf431
commit c870caee03
2 changed files with 2 additions and 2 deletions

View file

@ -13,7 +13,8 @@
TextEditComponent::TextEditComponent(Window* window) : GuiComponent(window),
mBox(window, ":/textinput_ninepatch.png"), mFocused(false),
mScrollOffset(0.0f, 0.0f), mCursor(0), mEditing(false), mFont(Font::get(FONT_SIZE_MEDIUM, FONT_PATH_LIGHT))
mScrollOffset(0.0f, 0.0f), mCursor(0), mEditing(false), mFont(Font::get(FONT_SIZE_MEDIUM, FONT_PATH_LIGHT)),
mCursorRepeatDir(0)
{
addChild(&mBox);

View file

@ -684,7 +684,6 @@ Eigen::Vector2f Font::getWrappedTextCursorOffset(std::string text, float xLen, s
{
lineWidth = 0.0f;
y += getHeight(lineSpacing);
wrapCursor = getPrevCursor(wrappedText, wrapCursor); // unconsume
continue;
}