summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateropenobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloateropenobject.cpp')
-rw-r--r--indra/newview/llfloateropenobject.cpp46
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);
}