summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-03-21 18:51:26 +0200
committerandreykproductengine <akleshchev@productengine.com>2016-03-21 18:51:26 +0200
commit9412e79698c004ead460d4295933fd039ddb796e (patch)
treedbd986aeea9e20498b71ef5af82b5006b3abee50
parentca1d7da5718a4ad40856fe404ce89690da984f15 (diff)
MAINT-6130 FIXED Resizing "Picks" floater breaks formatting in list items
-rwxr-xr-xindra/newview/llexpandabletextbox.cpp22
-rwxr-xr-xindra/newview/llexpandabletextbox.h1
2 files changed, 16 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();
diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h
index 90d46ab262..aaf393277f 100755
--- a/indra/newview/llexpandabletextbox.h
+++ b/indra/newview/llexpandabletextbox.h
@@ -147,6 +147,7 @@ public:
* *HACK: Update the inner textbox shape.
*/
void updateTextShape();
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/**
* Draws text box, collapses text box if its expanded and its parent's position changed