summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-08-25 14:48:18 -0500
committerDave Parks <davep@lindenlab.com>2010-08-25 14:48:18 -0500
commit2f012dd34f01b359c487c778cbf8842eb419e7c3 (patch)
tree2682cf545422d6656a0635bc6a28cba1b797dc66 /indra/llui
parent6fbc79d5e861085375d776a4da4a5921650b3115 (diff)
parent314a89535791e1e5a0c3f4d901c9c1d16fb9b6cc (diff)
merge
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lllineeditor.cpp6
-rw-r--r--indra/llui/llview.cpp14
-rw-r--r--indra/llui/llview.h8
3 files changed, 19 insertions, 9 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index c93ca1af88..c0cc294c02 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -377,7 +377,11 @@ void LLLineEditor::setText(const LLStringExplicit &new_text)
setCursor(llmin((S32)mText.length(), getCursor()));
// Set current history line to end of history.
- if(mLineHistory.end() != mLineHistory.begin())
+ if (mLineHistory.empty())
+ {
+ mCurrentHistoryLine = mLineHistory.end();
+ }
+ else
{
mCurrentHistoryLine = mLineHistory.end() - 1;
}
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 4d3708302b..323a600b5b 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),
@@ -1310,7 +1310,13 @@ void LLView::drawChildren()
{
if (!mChildList.empty())
{
- LLRect rootRect = getRootView()->getRect();
+ static const LLRect* rootRect = NULL;
+
+ if (!mParentView)
+ {
+ rootRect = &mRect;
+ }
+
LLRect screenRect;
++sDepth;
@@ -1324,7 +1330,7 @@ void LLView::drawChildren()
{
// 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();
{
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 37f5232f91..483d22b28f 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -291,7 +291,7 @@ public:
void setAllChildrenEnabled(BOOL b);
virtual void setVisible(BOOL visible);
- BOOL getVisible() const { return mVisible; }
+ const BOOL& getVisible() const { return mVisible; }
virtual void setEnabled(BOOL enabled);
BOOL getEnabled() const { return mEnabled; }
/// 'available' in this context means 'visible and enabled': in other
@@ -556,11 +556,13 @@ private:
LLView* mParentView;
child_list_t mChildList;
- std::string mName;
// location in pixels, relative to surrounding structure, bottom,left=0,0
+ BOOL mVisible;
LLRect mRect;
LLRect mBoundingRect;
+
std::string mLayout;
+ std::string mName;
U32 mReshapeFlags;
@@ -582,8 +584,6 @@ private:
LLRootHandle<LLView> mHandle;
BOOL mLastVisible;
- BOOL mVisible;
-
S32 mNextInsertionOrdinal;
static LLWindow* sWindow; // All root views must know about their window.