From 0fd86e994afb7edb4fb923f7b46da77ad423acc2 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 15 Dec 2012 14:28:23 -0500 Subject: [PATCH] make the comment box always multiline. Fixing pasting large amounts of text into it. --- src/preview/PreviewView.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index d6c444858..0e8c43cf2 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -208,7 +208,6 @@ void PreviewView::commentBoxAutoHeight() int textWidth = Graphics::textwidth(addCommentBox->GetText().c_str()); if(textWidth+15 > Size.X-(XRES/2)-48) { - addCommentBox->SetMultiline(true); addCommentBox->Appearance.VerticalAlign = ui::Appearance::AlignTop; int oldSize = addCommentBox->Size.Y; @@ -225,7 +224,6 @@ void PreviewView::commentBoxAutoHeight() else { commentBoxHeight = 20; - addCommentBox->SetMultiline(false); addCommentBox->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; commentBoxPositionX = (XRES/2)+4; @@ -467,6 +465,7 @@ void PreviewView::NotifyCommentBoxEnabledChanged(PreviewModel * sender) addCommentBox = new ui::Textbox(ui::Point((XRES/2)+4, Size.Y-19), ui::Point(Size.X-(XRES/2)-48, 17), "", "Add Comment"); addCommentBox->SetActionCallback(new AutoCommentSizeAction(this)); addCommentBox->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; + addCommentBox->SetMultiline(true); AddComponent(addCommentBox); submitCommentButton = new ui::Button(ui::Point(Size.X-40, Size.Y-19), ui::Point(40, 19), "Submit"); submitCommentButton->SetActionCallback(new SubmitCommentAction(this));