diff options
author | richard <none@none> | 2009-10-30 18:24:42 -0700 |
---|---|---|
committer | richard <none@none> | 2009-10-30 18:24:42 -0700 |
commit | d8d678307c1831ee5f8580c709c4430e2ce7fd8d (patch) | |
tree | 09aa15753fb0a02a4a96d91504995b1dc24d7b70 /indra/newview/llexpandabletextbox.cpp | |
parent | 2fadd99877eceb55077957b5bab6353611184c86 (diff) | |
parent | c964f281906e760c88c4f01edc566df35291ddff (diff) |
merge
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; |