diff options
author | Merov Linden <merov@lindenlab.com> | 2014-06-17 11:12:27 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-06-17 11:12:27 -0700 |
commit | c4c8debfc230b4ec6d28c7a84cd2a9bb81d6c894 (patch) | |
tree | d01f663d3fc1562d773a229e943addb02d14089f /indra/newview/llfloateropenobject.cpp | |
parent | 51865f4e94885471dba0402b33f0b11b72bbdb30 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llfloateropenobject.cpp')
-rwxr-xr-x | indra/newview/llfloateropenobject.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index 4bfef8b45f..9986bdbd7f 100755 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -162,21 +162,17 @@ void LLFloaterOpenObject::moveToInventory(bool wear) { parent_category_id = gInventory.getRootFolderID(); } - - LLCategoryCreate* cat_data = new LLCategoryCreate(object_id, wear); - + + inventory_func_type func = boost::bind(LLFloaterOpenObject::callbackCreateInventoryCategory,_1,object_id,wear); LLUUID category_id = gInventory.createNewCategory(parent_category_id, LLFolderType::FT_NONE, name, - callbackCreateInventoryCategory, - (void*)cat_data); + func); //If we get a null category ID, we are using a capability in createNewCategory and we will //handle the following in the callbackCreateInventoryCategory routine. if ( category_id.notNull() ) { - delete cat_data; - LLCatAndWear* data = new LLCatAndWear; data->mCatID = category_id; data->mWear = wear; @@ -198,20 +194,17 @@ void LLFloaterOpenObject::moveToInventory(bool wear) } // static -void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLSD& result, void* data) +void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLUUID& category_id, LLUUID object_id, bool wear) { - LLCategoryCreate* cat_data = (LLCategoryCreate*)data; - - LLUUID category_id = result["folder_id"].asUUID(); LLCatAndWear* wear_data = new LLCatAndWear; wear_data->mCatID = category_id; - wear_data->mWear = cat_data->mWear; + wear_data->mWear = wear; wear_data->mFolderResponded = true; // Copy and/or move the items into the newly created folder. // Ignore any "you're going to break this item" messages. - BOOL success = move_inv_category_world_to_agent(cat_data->mObjectID, category_id, TRUE, + BOOL success = move_inv_category_world_to_agent(object_id, category_id, TRUE, callbackMoveInventory, (void*)wear_data); if (!success) @@ -221,7 +214,6 @@ void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLSD& result, vo LLNotificationsUtil::add("OpenObjectCannotCopy"); } - delete cat_data; } // static |