summaryrefslogtreecommitdiff
path: root/src/preview/PreviewView.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-12-15 19:28:23 (GMT)
committer jacob1 <jfu614@gmail.com>2012-12-15 19:28:23 (GMT)
commit0fd86e994afb7edb4fb923f7b46da77ad423acc2 (patch)
tree56c6c7cfeb5f9b5ab42d170c30cc90e2224af8c1 /src/preview/PreviewView.cpp
parent735b2b659f2baf824d104cb5e58f64b4c2587817 (diff)
downloadpowder-0fd86e994afb7edb4fb923f7b46da77ad423acc2.zip
powder-0fd86e994afb7edb4fb923f7b46da77ad423acc2.tar.gz
make the comment box always multiline. Fixing pasting large amounts of text into it.
Diffstat (limited to 'src/preview/PreviewView.cpp')
-rw-r--r--src/preview/PreviewView.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp
index d6c4448..0e8c43c 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));