diff options
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index dc53358311..7e88320f49 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -54,6 +54,7 @@ #include "llviewerwindow.h" #include "lltrans.h" #include "llappearancemgr.h" +#include "llfloatercustomize.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -611,9 +612,9 @@ void LLViewerInventoryCategory::determineFolderType() const LLViewerInventoryItem *item = (*item_iter); if (item->getIsLinkType()) return; - if (item->getInventoryType() == LLInventoryType::IT_WEARABLE) + if (item->isWearableType()) { - const EWearableType wearable_type = EWearableType(item->getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK); + const EWearableType wearable_type = item->getWearableType(); const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type); U64 valid_folder_types = LLFolderType::lookupValidFolderTypes(wearable_name); folder_valid |= valid_folder_types; @@ -729,6 +730,14 @@ void WearOnAvatarCallback::fire(const LLUUID& inv_item) void ModifiedCOFCallback::fire(const LLUUID& inv_item) { LLAppearanceManager::instance().updateAppearanceFromCOF(); + if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() ) + { + // If we're in appearance editing mode, the current tab may need to be refreshed + if (gFloaterCustomize) + { + gFloaterCustomize->switchToDefaultSubpart(); + } + } } RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp) @@ -1269,6 +1278,22 @@ U32 LLViewerInventoryItem::getFlags() const return LLInventoryItem::getFlags(); } +bool LLViewerInventoryItem::isWearableType() const +{ + return (getInventoryType() == LLInventoryType::IT_WEARABLE); +} + +EWearableType LLViewerInventoryItem::getWearableType() const +{ + if (!isWearableType()) + { + llwarns << "item is not a wearable" << llendl; + return WT_INVALID; + } + return EWearableType(getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK); +} + + time_t LLViewerInventoryItem::getCreationDate() const { return LLInventoryItem::getCreationDate(); |