summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-07-14 19:06:17 +0000
committerJames Cook <james@lindenlab.com>2009-07-14 19:06:17 +0000
commit83a6ea234f32bf30d1f16b276d128debb2aeea02 (patch)
tree0950d0cccb1effa90c1da7f479adb591f3de3d68 /indra/llui/llview.cpp
parent9ecdbd8b72fec5182d2a5f843c9e4a050069ed51 (diff)
Merge skinning-15 to viewer-2. Fixes include:
DEV-35175 Spawning context menu should not move mouse cursor (Note: introduces regression where menu can fall off bottom of screen, will fix shortly) DEV-35143 Modal alerts appear behind side tray DEV-35141 Landmarks image and description outside of landmarks Merging revisions 126418-126419,126726-126727,126856-126857,127010-127011,127014-127016 of svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-15 into G:\viewer-2.0.0-3, respecting ancestry
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index f01aacb797..2f9a6e7d46 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -401,32 +401,28 @@ bool LLCompareByTabOrder::operator() (const LLView* const a, const LLView* const
return (a_score == b_score) ? a < b : a_score < b_score;
}
-BOOL LLView::isInVisibleChain() const
+bool LLView::trueToRoot(const boost::function<bool (const LLView*)>& predicate) const
{
const LLView* cur_view = this;
while(cur_view)
{
- if (!cur_view->getVisible())
+ if(!predicate(cur_view))
{
- return FALSE;
+ return false;
}
cur_view = cur_view->getParent();
}
- return TRUE;
+ return true;
+}
+
+BOOL LLView::isInVisibleChain() const
+{
+ return trueToRoot(&LLView::getVisible);
}
BOOL LLView::isInEnabledChain() const
{
- const LLView* cur_view = this;
- while(cur_view)
- {
- if (!cur_view->getEnabled())
- {
- return FALSE;
- }
- cur_view = cur_view->getParent();
- }
- return TRUE;
+ return trueToRoot(&LLView::getEnabled);
}
// virtual