This fixes Copy+Wear from object
This commit is contained in:
@@ -170,12 +170,28 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
|
|||||||
//handle the following in the callbackCreateInventoryCategory routine.
|
//handle the following in the callbackCreateInventoryCategory routine.
|
||||||
if ( category_id.notNull() )
|
if ( category_id.notNull() )
|
||||||
{
|
{
|
||||||
LLSD result;
|
delete cat_data;
|
||||||
result["folder_id"] = category_id;
|
|
||||||
//Reduce redundant code by just calling the callback. Dur.
|
LLCatAndWear* data = new LLCatAndWear;
|
||||||
callbackCreateInventoryCategory(result,cat_data);
|
data->mCatID = category_id;
|
||||||
|
data->mWear = wear;
|
||||||
|
data->mFolderResponded = false;
|
||||||
|
|
||||||
|
// 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(object_id, category_id, TRUE,
|
||||||
|
callbackMoveInventory,
|
||||||
|
(void*)data);
|
||||||
|
if (!success)
|
||||||
|
{
|
||||||
|
delete data;
|
||||||
|
data = NULL;
|
||||||
|
|
||||||
|
LLNotificationsUtil::add("OpenObjectCannotCopy");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLSD& result, void* data)
|
void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLSD& result, void* data)
|
||||||
|
|||||||
@@ -4544,7 +4544,10 @@ void LLOutfitObserver::done()
|
|||||||
class LLOutfitFetch : public LLInventoryFetchDescendentsObserver
|
class LLOutfitFetch : public LLInventoryFetchDescendentsObserver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLOutfitFetch(const LLUUID& id, bool copy_items, bool append) : mCopyItems(copy_items), mAppend(append) {}
|
LLOutfitFetch(const LLUUID& id, bool copy_items, bool append) :
|
||||||
|
LLInventoryFetchDescendentsObserver(id),
|
||||||
|
mCopyItems(copy_items),
|
||||||
|
mAppend(append) {}
|
||||||
~LLOutfitFetch() {}
|
~LLOutfitFetch() {}
|
||||||
virtual void done();
|
virtual void done();
|
||||||
protected:
|
protected:
|
||||||
@@ -4559,6 +4562,18 @@ void LLOutfitFetch::done()
|
|||||||
// happen.
|
// happen.
|
||||||
LLInventoryModel::cat_array_t cat_array;
|
LLInventoryModel::cat_array_t cat_array;
|
||||||
LLInventoryModel::item_array_t item_array;
|
LLInventoryModel::item_array_t item_array;
|
||||||
|
|
||||||
|
// Avoid passing a NULL-ref as mCompleteFolders.front() down to
|
||||||
|
// gInventory.collectDescendents()
|
||||||
|
if( mComplete.empty() )
|
||||||
|
{
|
||||||
|
llwarns << "LLOutfitFetch::done with empty mCompleteFolders" << llendl;
|
||||||
|
dec_busy_count();
|
||||||
|
gInventory.removeObserver(this);
|
||||||
|
delete this;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
gInventory.collectDescendents(mComplete.front(),
|
gInventory.collectDescendents(mComplete.front(),
|
||||||
cat_array,
|
cat_array,
|
||||||
item_array,
|
item_array,
|
||||||
|
|||||||
Reference in New Issue
Block a user