diff options
| author | Igor Borovkov <iborovkov@productengine.com> | 2010-05-27 13:24:06 +0300 |
|---|---|---|
| committer | Igor Borovkov <iborovkov@productengine.com> | 2010-05-27 13:24:06 +0300 |
| commit | 07dba9ae377d216e049aa9c3019bc51571b48488 (patch) | |
| tree | 2308fa0731235bc36bc424490feb43e9bdfc18f9 /indra/newview/llstartup.cpp | |
| parent | 990e31bb692b62e05f6065b04207acb8ca50cce4 (diff) | |
EXT-7422 FIXED saving initial outfit in My Outfits on very first login
added saving initial outfit in My Outfits when wearables got loaded
Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/450/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llstartup.cpp')
| -rw-r--r-- | indra/newview/llstartup.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0a464b3b6c..466c154f36 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -225,6 +225,7 @@ extern S32 gStartImageHeight; static bool gGotUseCircuitCodeAck = false; static std::string sInitialOutfit; static std::string sInitialOutfitGender; // "male" or "female" +static boost::signals2::connection sWearablesLoadedCon; static bool gUseCircuitCallbackCalled = false; @@ -2430,6 +2431,8 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, } else { + sWearablesLoadedCon = gAgentWearables.addLoadedCallback(LLStartUp::saveInitialOutfit); + bool do_copy = true; bool do_append = false; LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); @@ -2475,6 +2478,24 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, } +//static +void LLStartUp::saveInitialOutfit() +{ + if (sInitialOutfit.empty()) return; + + if (sWearablesLoadedCon.connected()) + { + sWearablesLoadedCon.disconnect(); + } + + LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit); +} + +std::string& LLStartUp::getInitialOutfitName() +{ + return sInitialOutfit; +} + // Loads a bitmap to display during load void init_start_screen(S32 location_id) { |
