summaryrefslogtreecommitdiff
path: root/indra/llui/llbadgeowner.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-06-17 10:40:42 -0700
committersimon <none@none>2014-06-17 10:40:42 -0700
commit592024b5805a116c9d0bef893127427df0741b41 (patch)
treebcadc0685873b40e23254cf3d6232e8f1f3f0e1b /indra/llui/llbadgeowner.cpp
parent9e855b03b7f285794520eaf781b6a963b6cd51d9 (diff)
parent977476171ddcc057d7c28b6c14ae988b8189ed75 (diff)
Merge viewer-release and become version 3.7.9
Diffstat (limited to 'indra/llui/llbadgeowner.cpp')
-rwxr-xr-xindra/llui/llbadgeowner.cpp45
1 files changed, 9 insertions, 36 deletions
diff --git a/indra/llui/llbadgeowner.cpp b/indra/llui/llbadgeowner.cpp
index 1860a05edd..55e64bb940 100755
--- a/indra/llui/llbadgeowner.cpp
+++ b/indra/llui/llbadgeowner.cpp
@@ -35,8 +35,9 @@
//
LLBadgeOwner::LLBadgeOwner(LLHandle< LLView > viewHandle)
- : mBadge(NULL)
- , mBadgeOwnerView(viewHandle)
+ : mHasBadgeHolderParent(false),
+ mBadge(NULL),
+ mBadgeOwnerView(viewHandle)
{
}
@@ -45,31 +46,12 @@ void LLBadgeOwner::initBadgeParams(const LLBadge::Params& p)
if (!p.equals(LLUICtrlFactory::getDefaultParams<LLBadge>()))
{
mBadge = createBadge(p);
- }
-}
-
-void LLBadgeOwner::setBadgeLabel(const LLStringExplicit& label)
-{
- if (mBadge == NULL)
- {
- mBadge = createBadge(LLUICtrlFactory::getDefaultParams<LLBadge>());
-
- addBadgeToParentPanel();
- }
-
- if (mBadge)
- {
- mBadge->setLabel(label);
-
- //
- // Push the badge to the front so it renders on top
- //
-
- LLView * parent = mBadge->getParent();
+ mHasBadgeHolderParent = false;
- if (parent)
+ LLView * owner_view = mBadgeOwnerView.get();
+ if (owner_view)
{
- parent->sendChildToFront(mBadge);
+ mBadge->addToView(owner_view);
}
}
}
@@ -82,10 +64,8 @@ void LLBadgeOwner::setBadgeVisibility(bool visible)
}
}
-bool LLBadgeOwner::addBadgeToParentPanel()
+void LLBadgeOwner::addBadgeToParentHolder()
{
- bool badge_added = false;
-
LLView * owner_view = mBadgeOwnerView.get();
if (mBadge && owner_view)
@@ -110,16 +90,9 @@ bool LLBadgeOwner::addBadgeToParentPanel()
if (badge_holder)
{
- badge_added = badge_holder->addBadge(mBadge);
- }
- else
- {
- // Badge parent is fallback badge owner if no valid holder exists in the hierarchy
- badge_added = mBadge->addToView(owner_view);
+ mHasBadgeHolderParent = badge_holder->addBadge(mBadge);
}
}
-
- return badge_added;
}
LLBadge* LLBadgeOwner::createBadge(const LLBadge::Params& p)