summaryrefslogtreecommitdiff
path: root/src/interface
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-27 17:21:34 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-27 17:21:34 (GMT)
commit09d32f225b531e42416e31199aefcc256cf7ee50 (patch)
tree0b98e5c05613ddc20bfbe7688e62096258f656ed /src/interface
parent2ae37525e3c8d79cbaee6dd8c511f1172c1cfdc2 (diff)
downloadpowder-09d32f225b531e42416e31199aefcc256cf7ee50.zip
powder-09d32f225b531e42416e31199aefcc256cf7ee50.tar.gz
Ensure previewview comment box resizing is triggered.
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/Label.cpp8
-rw-r--r--src/interface/Label.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp
index d4bd82e..e19b6b8 100644
--- a/src/interface/Label.cpp
+++ b/src/interface/Label.cpp
@@ -59,6 +59,14 @@ void Label::SetText(std::string text)
}
}
+void Label::AutoHeight()
+{
+ bool oldAH = autoHeight;
+ autoHeight = true;
+ updateMultiline();
+ autoHeight = oldAH;
+}
+
void Label::updateMultiline()
{
int lines = 1;
diff --git a/src/interface/Label.h b/src/interface/Label.h
index f701580..f5fa1a7 100644
--- a/src/interface/Label.h
+++ b/src/interface/Label.h
@@ -55,6 +55,7 @@ namespace ui
virtual bool HasSelection();
virtual void ClearSelection();
+ virtual void AutoHeight();
void SetTextColour(Colour textColour) { this->textColour = textColour; }