diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-07 00:13:59 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-07 00:13:59 +0300 |
commit | 0b16cd0da40e8064b4ebf6b7fc679c0d710a7346 (patch) | |
tree | 5719fc6e0a439896f005f913aedc29dcdd0bbc7f /indra/newview/llviewerinventory.h | |
parent | 9ac73955faed007e98edf028b4843adcfee0fded (diff) |
SL-19823 Edit not active for items
Diffstat (limited to 'indra/newview/llviewerinventory.h')
-rw-r--r-- | indra/newview/llviewerinventory.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index d788f23d0c..6d3676ba2e 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -256,6 +256,7 @@ protected: class LLInventoryCallback : public LLRefCount { public: + virtual ~LLInventoryCallback() {} virtual void fire(const LLUUID& inv_item) = 0; }; @@ -294,17 +295,29 @@ class LLBoostFuncInventoryCallback: public LLInventoryCallback { public: - LLBoostFuncInventoryCallback(inventory_func_type fire_func = no_op_inventory_func, + LLBoostFuncInventoryCallback(inventory_func_type fire_func, nullary_func_type destroy_func = no_op): - mFireFunc(fire_func), mDestroyFunc(destroy_func) { + mFireFuncs.push_back(fire_func); } + LLBoostFuncInventoryCallback() + { + } + + void addOnFireFunc(inventory_func_type fire_func) + { + mFireFuncs.push_back(fire_func); + } + // virtual void fire(const LLUUID& item_id) { - mFireFunc(item_id); + for (inventory_func_type &func: mFireFuncs) + { + func(item_id); + } } // virtual @@ -315,7 +328,7 @@ public: private: - inventory_func_type mFireFunc; + std::list<inventory_func_type> mFireFuncs; nullary_func_type mDestroyFunc; }; |