diff options
| author | richard <none@none> | 2009-10-30 17:46:28 -0700 |
|---|---|---|
| committer | richard <none@none> | 2009-10-30 17:46:28 -0700 |
| commit | c964f281906e760c88c4f01edc566df35291ddff (patch) | |
| tree | 431bef201d87f3628c9702a5ec73ca8737d198b5 /indra/newview/llexpandabletextbox.cpp | |
| parent | 123db56856ef0451e28fe7ac7ce3bcc27d3066f1 (diff) | |
| parent | b82bda605d85fe9b1ad69ce36a36de18a2924924 (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; |
