diff options
author | Dave Parks <davep@lindenlab.com> | 2010-06-03 12:53:11 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-06-03 12:53:11 -0500 |
commit | 64d51dbc4482c12bc1ae56598b924cfe6f0ff0e9 (patch) | |
tree | 482cc191426a9332d3b900b7f8136f6a340ddb64 /indra/llui | |
parent | 8b16faec3096e32b76b227efcb67fd33e7254f40 (diff) | |
parent | 26ba00b5554d20ee958693ced87b36fa7f6e3d99 (diff) |
merge
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lllineeditor.cpp | 9 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 22 |
2 files changed, 23 insertions, 8 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 45f9de8e8d..c0cc294c02 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -377,7 +377,14 @@ void LLLineEditor::setText(const LLStringExplicit &new_text) setCursor(llmin((S32)mText.length(), getCursor())); // Set current history line to end of history. - mCurrentHistoryLine = mLineHistory.end() - 1; + if (mLineHistory.empty()) + { + mCurrentHistoryLine = mLineHistory.end(); + } + else + { + mCurrentHistoryLine = mLineHistory.end() - 1; + } mPrevText = mText; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index e67f0ec3fc..459041f67d 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -123,7 +123,8 @@ LLView::Params::Params() } LLView::LLView(const LLView::Params& p) -: mName(p.name), +: mVisible(p.visible), + mName(p.name), mParentView(NULL), mReshapeFlags(FOLLOWS_NONE), mFromXUI(p.from_xui), @@ -132,7 +133,6 @@ LLView::LLView(const LLView::Params& p) mNextInsertionOrdinal(0), mHoverCursor(getCursorFromString(p.hover_cursor)), mEnabled(p.enabled), - mVisible(p.visible), mMouseOpaque(p.mouse_opaque), mSoundFlags(p.sound_flags), mUseBoundingRect(p.use_bounding_rect), @@ -1309,7 +1309,13 @@ void LLView::drawChildren() { if (!mChildList.empty()) { - LLRect rootRect = getRootView()->getRect(); + static const LLRect* rootRect = NULL; + + if (!mParentView) + { + rootRect = &mRect; + } + LLRect screenRect; ++sDepth; @@ -1319,13 +1325,15 @@ void LLView::drawChildren() child_list_reverse_iter_t child = child_iter++; LLView *viewp = *child; - if (viewp->getVisible() && viewp->getRect().isValid()) + if (!viewp->getVisible() || !viewp->getRect().isValid()) + { + continue; + } + { - // check for bad data - llassert_always(viewp->getVisible() == TRUE); // Only draw views that are within the root view localRectToScreen(viewp->getRect(),&screenRect); - if ( rootRect.overlaps(screenRect) && LLUI::sDirtyRect.overlaps(screenRect)) + if ( rootRect->overlaps(screenRect) && LLUI::sDirtyRect.overlaps(screenRect)) { LLUI::pushMatrix(); { |