summaryrefslogtreecommitdiff
path: root/indra/newview/llexpandabletextbox.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-05-06 09:05:51 -0400
committerOz Linden <oz@lindenlab.com>2016-05-06 09:05:51 -0400
commita07a8cbf6eca73272f2c774df7122a1f0c5e1aa9 (patch)
treef716bdae5a265aabf8f9da1413df6a19fe3ada52 /indra/newview/llexpandabletextbox.cpp
parentc938e165062cbe53065dcdaa434fc1c3d9f38774 (diff)
parent94559950a2c670990db56bd74e65d26652421b8c (diff)
merge changes for 4.0.4-release
Diffstat (limited to 'indra/newview/llexpandabletextbox.cpp')
-rwxr-xr-xindra/newview/llexpandabletextbox.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 4dbed114bb..f0331f20d8 100755
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -122,8 +122,6 @@ LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p)
void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLTextEditor::reshape(width, height, called_from_parent);
-
- hideOrShowExpandTextAsNeeded();
}
void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,const LLStyle::Params& input_params)
@@ -298,6 +296,12 @@ void LLExpandableTextBox::updateTextBoxRect()
mTextBox->reshape(rc.getWidth(), rc.getHeight());
mTextBox->setRect(rc);
+ // *HACK
+ // hideExpandText brakes text styles (replaces hyper-links with plain text), see ticket EXT-3290
+ // Also text segments are not removed properly. Same issue at expandTextBox().
+ // So set text again to make text box re-apply styles and clear segments.
+ // *TODO Find a solution that does not involve text segment.
+ mTextBox->setText(mText);
}
S32 LLExpandableTextBox::recalculateTextDelta(S32 text_delta)
@@ -403,8 +407,6 @@ void LLExpandableTextBox::collapseTextBox()
setRect(mCollapsedRect);
updateTextBoxRect();
-
- gViewerWindow->removePopup(this);
}
void LLExpandableTextBox::onFocusLost()
@@ -423,13 +425,19 @@ void LLExpandableTextBox::onTopLost()
void LLExpandableTextBox::updateTextShape()
{
- // I guess this should be done on every reshape(),
- // but adding this code to reshape() currently triggers bug VWR-26455,
- // which makes the text virtually unreadable.
llassert(!mExpanded);
updateTextBoxRect();
}
+void LLExpandableTextBox::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ mExpanded = false;
+ LLUICtrl::reshape(width, height, called_from_parent);
+ updateTextBoxRect();
+
+ gViewerWindow->removePopup(this);
+}
+
void LLExpandableTextBox::setValue(const LLSD& value)
{
collapseTextBox();