diff options
author | Dessie Linden <dessie@lindenlab.com> | 2010-07-06 13:22:22 -0700 |
---|---|---|
committer | Dessie Linden <dessie@lindenlab.com> | 2010-07-06 13:22:22 -0700 |
commit | a6b108641489caca1717b98cb888ef2de923f1fc (patch) | |
tree | afbd1e6a8e5e64357ceb2193e505f6a217d758bd /indra/newview/llfloateropenobject.cpp | |
parent | ef735d839317c5d8837c3ce9afd66cb576a2ba94 (diff) | |
parent | dc6c35e353b991db2651d26bc76e5b3ee9921157 (diff) |
Merged from viewer-release after resolving conflicts
Diffstat (limited to 'indra/newview/llfloateropenobject.cpp')
-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); } |