diff options
author | Leslie Linden <none@none> | 2011-06-10 16:20:30 -0700 |
---|---|---|
committer | Leslie Linden <none@none> | 2011-06-10 16:20:30 -0700 |
commit | 3eeb14ee0abb5720e010d94eba52db09fa32237e (patch) | |
tree | 17e36f9d42098b912302aa6fd79e9ad67eaa93ce /indra/llui | |
parent | 7ed78f92747a7234435d1b6ceef50a3053003f48 (diff) |
EXP-856 FIX -- Inbox item count reflected as badge on inventory button
* Modified badges to be parented to their owners if their owners have no parents
* Modified side tray tab panels to create badges on side tab buttons when the
xml specifies a badge.
* Modified inbox to drive the badge value of the sidebar_inventory button.
* Updated inbox and outbox sizes so scroll bars function as expected
* Updated inventory_panel.xml to allow scroll tag to specify scroll bar
properties, instead of just having them hardcoded.
Reviewed by Richard
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llbadgeowner.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/llui/llbadgeowner.cpp b/indra/llui/llbadgeowner.cpp index 11f1463b9b..3d63fc7f60 100644 --- a/indra/llui/llbadgeowner.cpp +++ b/indra/llui/llbadgeowner.cpp @@ -79,26 +79,28 @@ void LLBadgeOwner::addBadgeToParentPanel() if (mBadge && owner_view) { - // Find the appropriate parent panel for the badge + // Badge parent is badge owner by default + LLView * badge_parent = owner_view; + // Find the appropriate parent for the badge LLView * parent = owner_view->getParent(); - LLPanel * parent_panel = NULL; while (parent) { - parent_panel = dynamic_cast<LLPanel *>(parent); + LLPanel * parent_panel = dynamic_cast<LLPanel *>(parent); if (parent_panel && parent_panel->acceptsBadge()) { + badge_parent = parent; break; } parent = parent->getParent(); } - if (parent_panel) + if (badge_parent) { - parent_panel->addChild(mBadge); + badge_parent->addChild(mBadge); } else { |