From 50eb27a04d193ef145f8879e12d8a82089a66891 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 8 Jun 2010 15:36:48 +0300 Subject: EXT-7644 FIXED Implemented functionality for locking outfit modification controls and used it for 'save outfit' action. 1 Added functionality for locking outfit in LLAppearanceMgr. Outfit should be locked when outfit related operation is started(now it is used for updateBaseOutfit) and unlocked when operation completed or timeout is exceeded. 2 Added outfit saved and outfit lock changed signals to LLOutfitObserver. 3 Updated LLPanelOutfitsInventory and LLPanelOutfitEdit with functionality of controlling 'save outfit' controls state('save outfit' controls should be enabled only if outfit isn't locked and outfit is dirty). 4 Renamed action label of method LLPanelOutfitsInventory::isActionEnabled "make_outfit" to "save_outfit". --HG-- branch : product-engine --- indra/newview/llappearancemgr.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index f1beef5857..2227a43cd8 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -42,10 +42,12 @@ class LLWearable; class LLWearableHoldingPattern; class LLInventoryCallback; +class LLOutfitUnLockTimer; class LLAppearanceMgr: public LLSingleton { friend class LLSingleton; + friend class LLOutfitUnLockTimer; public: typedef std::vector wearables_by_type_t; @@ -162,6 +164,8 @@ public: // COF is processed if cat_id is not specified void updateClothingOrderingInfo(LLUUID cat_id = LLUUID::null); + bool isOutfitLocked() { return mOutfitLocked; } + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); @@ -186,10 +190,20 @@ private: static void onOutfitRename(const LLSD& notification, const LLSD& response); + void setOutfitLocked(bool locked); + std::set mRegisteredAttachments; bool mAttachmentInvLinkEnabled; bool mOutfitIsDirty; + /** + * Lock for blocking operations on outfit until server reply or timeout exceed + * to avoid unsynchronized outfit state or performing duplicate operations. + */ + bool mOutfitLocked; + + std::auto_ptr mUnlockOutfitTimer; + ////////////////////////////////////////////////////////////////////////////////// // Item-specific convenience functions public: -- cgit v1.2.3