summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-27 12:28:32 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-27 12:28:32 +0100
commite5273960de222ffae32405fde8e9fd566ff72d0a (patch)
treee4dbc9e0669f49f3e222ee9b3e8856700e300c98 /indra/newview/llstartup.cpp
parent63200e2a5bfc7538fd8114464000f35798670f23 (diff)
parent423398081b5c4402ebc162c43eaf29acdeb9f423 (diff)
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp21
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)
{