diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-04-08 12:07:58 +0300 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-04-08 12:07:58 +0300 |
commit | 00462c243116e2720acf51ee1f777e69e8189f33 (patch) | |
tree | 3181ab28309b7e488fb41b948b2cd575ae5a41e5 /indra/newview/llinventoryobserver.h | |
parent | 8ce661ae5d2a49bf120534769741932785cffb37 (diff) |
Fixed normal bug EXT-4347 (Moving object contents to inventory opens files, changes menu)
Implementation details:
* Added new LLViewerInventoryMoveFromWorldObserver to watch moved items via their Asses UUIDs. It is instantiated only once due to drop events are sent separately for each item while multi-dragging.
* Existent LLOpenTaskOffer observer uses it to exclude watched by LLViewerInventoryMoveFromWorldObserver items from own processing.
* Removed dependancy on LLPanelPlaces in open_inventory_offer(). Openning of offered LM via group notice moved into an appropriate section (processed by LLOpenTaskGroupOffer)
Known Issues:
* If Script item is among the dragged items from object to inventory it will be the only selected item in the inventory panel.
Reason: it does not have its own Asset UUID and processed via LLOpenTaskOffer when should not.
Reviewed by Leyla and Richard at https://codereview.productengine.com/secondlife/r/116/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llinventoryobserver.h')
-rw-r--r-- | indra/newview/llinventoryobserver.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index ba70552ebc..b710a9d326 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -194,6 +194,36 @@ protected: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryMovedObserver +// +// This class is used as a base class for doing something when all the +// item for observed asset ids were added into the inventory. +// Derive a class from this class and implement the done() method to do +// something useful. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLInventoryMoveFromWorldObserver : public LLInventoryObserver +{ +public: + LLInventoryMoveFromWorldObserver() : mIsDirty(false) {} + virtual void changed(U32 mask); + + void watchAsset(const LLUUID& asset_id); + bool isAssetWatched(const LLUUID& asset_id); + +protected: + virtual void onAssetAdded(const LLUUID& asset_id) {} + virtual void done() = 0; + + typedef std::vector<LLUUID> item_ref_t; + item_ref_t mAddedItems; + item_ref_t mWatchedAssets; + +private: + bool mIsDirty; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryAddedObserver // // This class is used as a base class for doing something when |