diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-02 14:17:24 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-02 14:17:24 -0500 |
| commit | 0a7ac2fc170d0a2144eca924f5a0b8ffa8363ce4 (patch) | |
| tree | 4b224e6b5e55d37690b4639e05b893cd04a4058e /indra/newview/llexpandabletextbox.cpp | |
| parent | 86b1ee7703bb57c6b1e1c068cda02bfb9ed0721e (diff) | |
| parent | 3783852444825edf420e6109927df21fd004c3e7 (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; |
