diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2023-11-13 10:04:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 10:04:50 -0800 |
commit | f45d26c4cb56ef87311a751d192115459468887a (patch) | |
tree | 754732201a3b8079e820ecf65333ba5740ad1179 /indra/newview/llviewerinventory.cpp | |
parent | b3384a057d9556b2429a9c5847e8e1240103585a (diff) | |
parent | a66a990165a2ade9cba26963fe0c7b4a21b9dcac (diff) |
Merge pull request #505 from secondlife/SL-20553
SL-20553: Save material button in build floater now depends on agent inventory rather than object inventory
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 5ee613d49d..1b70e5f84f 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1658,67 +1658,6 @@ void copy_inventory_from_notecard(const LLUUID& destination_id, } } -void move_or_copy_inventory_from_object(const LLUUID& destination_id, - const LLUUID& object_id, - const LLUUID& item_id, - LLPointer<LLInventoryCallback> cb) -{ - LLViewerObject* object = gObjectList.findObject(object_id); - if (!object) - { - return; - } - const LLInventoryItem* item = object->getInventoryItem(item_id); - if (!item) - { - return; - } - - class LLItemAddedObserver : public LLInventoryObserver - { - public: - LLItemAddedObserver(const LLUUID& copied_asset_id, LLPointer<LLInventoryCallback> cb) - : LLInventoryObserver(), - mAssetId(copied_asset_id), - mCallback(cb) - { - } - - void changed(U32 mask) override - { - if((mask & (LLInventoryObserver::ADD)) == 0) - { - return; - } - for (const LLUUID& changed_id : gInventory.getChangedIDs()) - { - LLViewerInventoryItem* changed_item = gInventory.getItem(changed_id); - if (changed_item->getAssetUUID() == mAssetId) - { - changeComplete(changed_item->getUUID()); - return; - } - } - } - - private: - void changeComplete(const LLUUID& item_id) - { - mCallback->fire(item_id); - gInventory.removeObserver(this); - delete this; - } - - LLUUID mAssetId; - LLPointer<LLInventoryCallback> mCallback; - }; - - const LLUUID& asset_id = item->getAssetUUID(); - LLItemAddedObserver* observer = new LLItemAddedObserver(asset_id, cb); - gInventory.addObserver(observer); - object->moveInventory(destination_id, item_id); -} - void create_new_item(const std::string& name, const LLUUID& parent_id, LLAssetType::EType asset_type, |