summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rwxr-xr-xindra/newview/llpaneloutfitedit.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index f75d76da94..496168229d 100755
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -159,6 +159,7 @@ public:
registrar.add("Wearable.Create", boost::bind(onCreate, _2));
+ llassert(LLMenuGL::sMenuContainer != NULL);
LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_cof_gear.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
llassert(menu);
@@ -169,14 +170,14 @@ public:
return menu;
}
-
+
private:
static void onCreate(const LLSD& param)
{
LLWearableType::EType type = LLWearableType::typeNameToType(param.asString());
if (type == LLWearableType::WT_NONE)
{
- llwarns << "Invalid wearable type" << llendl;
+ LL_WARNS() << "Invalid wearable type" << LL_ENDL;
return;
}
@@ -228,6 +229,7 @@ public:
enable_registrar.add("AddWearable.Gear.Check", boost::bind(onCheck, flat_list_handle, inventory_panel_handle, _2));
enable_registrar.add("AddWearable.Gear.Visible", boost::bind(onVisible, inventory_panel_handle, _2));
+ llassert(LLMenuGL::sMenuContainer != NULL);
LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_add_wearable_gear.xml",
LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
@@ -263,7 +265,7 @@ private:
}
else
{
- llwarns << "Unrecognized sort order action" << llendl;
+ LL_WARNS() << "Unrecognized sort order action" << LL_ENDL;
return;
}
@@ -306,7 +308,7 @@ private:
// If inventory panel is not sorted by date then it is sorted by name.
return LLWearableItemsList::E_SORT_BY_MOST_RECENT & ~sort_order;
}
- llwarns << "Unrecognized inventory panel sort order" << llendl;
+ LL_WARNS() << "Unrecognized inventory panel sort order" << LL_ENDL;
}
else
{
@@ -324,7 +326,7 @@ private:
{
return LLWearableItemsList::E_SORT_BY_TYPE_NAME == sort_order;
}
- llwarns << "Unrecognized wearable list sort order" << llendl;
+ LL_WARNS() << "Unrecognized wearable list sort order" << LL_ENDL;
}
return false;
}
@@ -481,7 +483,7 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetCommitCallback("shop_btn_1", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL);
childSetCommitCallback("shop_btn_2", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL);
- setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChanged, this, _2));
mWearablesGearMenuBtn = getChild<LLMenuButton>("wearables_gear_menu_btn");
mGearMenuBtn = getChild<LLMenuButton>("gear_menu_btn");
@@ -767,7 +769,7 @@ void LLPanelOutfitEdit::onPlusBtnClicked(void)
}
}
-void LLPanelOutfitEdit::onVisibilityChange(const LLSD &in_visible_chain)
+void LLPanelOutfitEdit::onVisibilityChanged(const LLSD &in_visible_chain)
{
showAddWearablesPanel(false);
mWearableItemsList->resetSelection();
@@ -842,7 +844,7 @@ void LLPanelOutfitEdit::onShopButtonClicked()
}
else
{
- llwarns << "Agent avatar is invalid" << llendl;
+ LL_WARNS() << "Agent avatar is invalid" << LL_ENDL;
// the second argument is not important in this case: generic market place will be opened
url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE);
@@ -1154,7 +1156,7 @@ BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
if (cargo_data == NULL)
{
- llwarns << "cargo_data is NULL" << llendl;
+ LL_WARNS() << "cargo_data is NULL" << LL_ENDL;
return TRUE;
}
@@ -1184,12 +1186,12 @@ BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
* second argument is used to delay the appearance update until all dragged items
* are added to optimize user experience.
*/
- LLAppearanceMgr::instance().addCOFItemLink(item->getLinkedUUID(), false);
+ LLAppearanceMgr::instance().addCOFItemLink(item->getLinkedUUID());
}
else
{
// if asset id is not available for the item we must wear it immediately (attachments only)
- LLAppearanceMgr::instance().addCOFItemLink(item->getLinkedUUID(), true);
+ LLAppearanceMgr::instance().addCOFItemLink(item->getLinkedUUID(), new LLUpdateAppearanceAndEditWearableOnDestroy(item->getUUID()));
}
}
@@ -1260,7 +1262,7 @@ void LLPanelOutfitEdit::resetAccordionState()
}
else
{
- llwarns << "mCOFWearables is NULL" << llendl;
+ LL_WARNS() << "mCOFWearables is NULL" << LL_ENDL;
}
}