summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-07-06 14:35:48 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-07-06 14:35:48 -0400
commit7de36b3d4217f5ceee8b46a59983229b7af35981 (patch)
tree4e4d736e87b338c68105ff6d6d8f2b5f30e46088 /indra
parentd1d38d6e9d6254d4ea40cc486426d2d8c528f58a (diff)
parent9d96da4b94c875b8f32e9893f37142ba07b0c453 (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentwearables.cpp13
-rw-r--r--indra/newview/llappearancemgr.cpp7
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp13
-rw-r--r--indra/newview/llpaneloutfitsinventory.h1
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml11
5 files changed, 36 insertions, 9 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index e70511ce6e..efa5eca217 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -511,7 +511,11 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type,
void LLAgentWearables::revertWearable(const LLWearableType::EType type, const U32 index)
{
LLWearable* wearable = getWearable(type, index);
- wearable->revertValues();
+ llassert(wearable);
+ if (wearable)
+ {
+ wearable->revertValues();
+ }
gAgent.sendAgentSetAppearance();
}
@@ -543,6 +547,7 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string&
{
LLWearable* old_wearable = getWearable((LLWearableType::EType)i,j);
llassert(old_wearable);
+ if (!old_wearable) continue;
std::string old_name = old_wearable->getName();
old_wearable->setName(new_name);
@@ -1940,7 +1945,11 @@ void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake)
for (S32 count = 0; count < (S32)getWearableCount((LLWearableType::EType)type); ++count)
{
LLWearable *wearable = getWearable((LLWearableType::EType)type,count);
- wearable->animateParams(delta, upload_bake);
+ llassert(wearable);
+ if (wearable)
+ {
+ wearable->animateParams(delta, upload_bake);
+ }
}
}
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 17efc28a6a..f8cff42412 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -989,16 +989,15 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up
{
removeCOFItemLinks(gAgentWearables.getWearableItemID(item_to_wear->getWearableType(), wearable_count-1), false);
}
+ addCOFItemLink(item_to_wear, do_update);
}
+ break;
case LLAssetType::AT_BODYPART:
// TODO: investigate wearables may not be loaded at this point EXT-8231
// Remove the existing wearables of the same type.
// Remove existing body parts anyway because we must not be able to wear e.g. two skins.
- if (item_to_wear->getType() == LLAssetType::AT_BODYPART)
- {
- removeCOFLinksOfType(item_to_wear->getWearableType(), false);
- }
+ removeCOFLinksOfType(item_to_wear->getWearableType(), false);
addCOFItemLink(item_to_wear, do_update);
break;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index c5d259e517..ca5679d5b0 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -282,10 +282,17 @@ void LLPanelOutfitsInventory::showGearMenu()
void LLPanelOutfitsInventory::onTrashButtonClick()
{
- mMyOutfitsPanel->removeSelected();
+ LLNotificationsUtil::add("DeleteOutfits", LLSD(), LLSD(), boost::bind(&LLPanelOutfitsInventory::onOutfitsRemovalConfirmation, this, _1, _2));
+}
- updateListCommands();
- updateVerbs();
+void LLPanelOutfitsInventory::onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0) return; // canceled
+
+ mMyOutfitsPanel->removeSelected();
+ updateListCommands();
+ updateVerbs();
}
bool LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index a50e047140..5c397e9c29 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -94,6 +94,7 @@ protected:
void onWearButtonClick();
void showGearMenu();
void onTrashButtonClick();
+ void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response);
bool isActionEnabled(const LLSD& userdata);
void setWearablesLoading(bool val);
void onWearablesLoaded();
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 290c8c55a9..04a8a02ecd 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -817,6 +817,17 @@ Delete pick &lt;nolink&gt;[PICK]&lt;/nolink&gt;?
<notification
icon="alertmodal.tga"
+ name="DeleteOutfits"
+ type="alertmodal">
+ Delete the selected outfit/s?
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="PromptGoToEventsPage"
type="alertmodal">
Go to the [SECOND_LIFE] events web page?