diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-02 18:08:04 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-02 18:08:04 +0200 |
commit | 3dc509bec08d39d44c8a2c1e81d31922a6c11239 (patch) | |
tree | 171e8b91df89fc581eb7189c2ed45a450aadef41 /indra/newview/llexpandabletextbox.cpp | |
parent | b06bc5944c23ccadfb6c99c65f4d498acc5e2a2d (diff) | |
parent | 265805a1b02555c01f9f2ac42000dbc731ab31c6 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llexpandabletextbox.cpp')
-rw-r--r-- | indra/newview/llexpandabletextbox.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 48b5fc11b7..7bc48185e6 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -51,7 +51,7 @@ public: /*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { // more label always spans width of text box - width = mEditor.getTextRect().getWidth(); + width = mEditor.getTextRect().getWidth() - mEditor.getHPad(); height = llceil(mStyle->getFont()->getLineHeight()); } /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const @@ -153,6 +153,11 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText() { if (!mExpanderVisible) { + // make sure we're scrolled to top when collapsing + if (mScroller) + { + mScroller->goToTop(); + } // get fully visible lines std::pair<S32, S32> visible_lines = getVisibleLines(true); S32 last_line = visible_lines.second - 1; |