summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index e54b9fe2ea..582c20c13f 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -859,6 +859,13 @@ const LLViewerInventoryItem* LLAppearanceMgr::getBaseOutfitLink()
const LLViewerInventoryCategory *cat = item->getLinkedCategory();
if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT)
{
+ const LLUUID parent_id = cat->getParentUUID();
+ LLViewerInventoryCategory* parent_cat = gInventory.getCategory(parent_id);
+ // if base outfit moved to trash it means that we don't have base outfit
+ if (parent_cat != NULL && parent_cat->getPreferredType() == LLFolderType::FT_TRASH)
+ {
+ return NULL;
+ }
return item;
}
}
@@ -1180,18 +1187,10 @@ bool LLAppearanceMgr::getCanRemoveOutfit(const LLUUID& outfit_cat_id)
return false;
}
- // Check if the folder contains worn items.
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- LLFindWorn filter_worn;
- gInventory.collectDescendentsIf(outfit_cat_id, cats, items, false, filter_worn);
- if (!items.empty())
- {
- return false;
- }
-
// Check for the folder's non-removable descendants.
LLFindNonRemovableObjects filter_non_removable;
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
LLInventoryModel::item_array_t::const_iterator it;
gInventory.collectDescendentsIf(outfit_cat_id, cats, items, false, filter_non_removable);
if (!cats.empty() || !items.empty())
@@ -1623,6 +1622,7 @@ void LLAppearanceMgr::getUserDescendents(const LLUUID& category,
void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append)
{
+ gAgentWearables.notifyLoadingStarted();
if(!category) return;
llinfos << "wearInventoryCategory( " << category->getName()
@@ -2215,13 +2215,19 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id)
class LLShowCreatedOutfit: public LLInventoryCallback
{
public:
- LLShowCreatedOutfit(LLUUID& folder_id): mFolderID(folder_id)
+ LLShowCreatedOutfit(LLUUID& folder_id, bool show_panel = true): mFolderID(folder_id), mShowPanel(show_panel)
{}
virtual ~LLShowCreatedOutfit()
{
LLSD key;
- LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key);
+
+ //EXT-7727. For new accounts LLShowCreatedOutfit is created during login process
+ // add may be processed after login process is finished
+ if (mShowPanel)
+ {
+ LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key);
+ }
LLPanelOutfitsInventory *outfit_panel =
dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
if (outfit_panel)
@@ -2245,9 +2251,10 @@ public:
private:
LLUUID mFolderID;
+ bool mShowPanel;
};
-LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name)
+LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, bool show_panel)
{
if (!isAgentAvatarValid()) return LLUUID::null;
@@ -2260,7 +2267,7 @@ LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name)
updateClothingOrderingInfo();
- LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id);
+ LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id,show_panel);
shallowCopyCategoryContents(getCOF(),folder_id, cb);
createBaseOutfitLink(folder_id, cb);