diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-07-02 11:42:31 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-07-02 11:42:31 -0400 |
commit | 655c3dbe1b711389c1f581f4ccae07dafb5cdefd (patch) | |
tree | 49e50bcd495205d121955e9f47f13f21357fb64c | |
parent | 708c93165763d1192168498cdf7af172d144a203 (diff) |
EXT-8204 FIXED Can't "Copy and Wear" items when object with contents is first opened
EXT-3278 REVERT "Copy and wear" exists for landmarks in object inventory
Fixed issue that was causing copy and wear to always be greyed out on first opening of object.
-rw-r--r-- | indra/newview/llfloateropenobject.cpp | 46 |
1 files changed, 10 insertions, 36 deletions
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index 71bfae316a..d39ed77491 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -105,49 +105,23 @@ void LLFloaterOpenObject::refresh() mPanelInventoryObject->refresh(); std::string name = ""; - - // Enable the copy || copy & wear buttons only if we have something we can copy or copy & wear (respectively). - bool copy_enabled = false; - bool wear_enabled = false; + BOOL enabled = FALSE; LLSelectNode* node = mObjectSelection->getFirstRootNode(); if (node) { name = node->mName; - copy_enabled = true; - - LLViewerObject* object = node->getObject(); - if (object) - { - // this folder is coming from an object, as there is only one folder in an object, the root, - // we need to collect the entire contents and handle them as a group - LLInventoryObject::object_list_t inventory_objects; - object->getInventoryContents(inventory_objects); - - if (!inventory_objects.empty()) - { - for (LLInventoryObject::object_list_t::iterator it = inventory_objects.begin(); - it != inventory_objects.end(); - ++it) - { - LLInventoryItem* item = static_cast<LLInventoryItem*> ((LLInventoryObject*)(*it)); - LLInventoryType::EType type = item->getInventoryType(); - if (type == LLInventoryType::IT_OBJECT - || type == LLInventoryType::IT_ATTACHMENT - || type == LLInventoryType::IT_WEARABLE - || type == LLInventoryType::IT_GESTURE) - { - wear_enabled = true; - break; - } - } - } - } + enabled = TRUE; } - + else + { + name = ""; + enabled = FALSE; + } + childSetTextArg("object_name", "[DESC]", name); - childSetEnabled("copy_to_inventory_button", copy_enabled); - childSetEnabled("copy_and_wear_button", wear_enabled); + childSetEnabled("copy_to_inventory_button", enabled); + childSetEnabled("copy_and_wear_button", enabled); } |