aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorArmin Weatherwax2010-08-26 16:39:24 +0200
committerMcCabe Maxsted2010-08-29 01:25:33 -0700
commitfc4e800ba8389c0d13caae414f9db4329022722e (patch)
tree2098223aed54b0b9ad2f5cfe1b2dd90c57642882 /linden/indra
parentKatharine Berry: Can load WindLight settings from LLSD notecards ending in ".wl" (diff)
downloadmeta-impy-fc4e800ba8389c0d13caae414f9db4329022722e.zip
meta-impy-fc4e800ba8389c0d13caae414f9db4329022722e.tar.gz
meta-impy-fc4e800ba8389c0d13caae414f9db4329022722e.tar.bz2
meta-impy-fc4e800ba8389c0d13caae414f9db4329022722e.tar.xz
Katharine Berry: Fixed WindLight settings not loading in many (most?) cases. Also fixed capitalisation of "WindLight".
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/newview/llwlparammanager.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/linden/indra/newview/llwlparammanager.cpp b/linden/indra/newview/llwlparammanager.cpp
index 8bbff25..74fa8f3 100644
--- a/linden/indra/newview/llwlparammanager.cpp
+++ b/linden/indra/newview/llwlparammanager.cpp
@@ -273,7 +273,17 @@ void LLWLParamManager::savePresets(const std::string & fileName)
273 273
274void LLWLParamManager::loadPreset(const std::string & name,bool propagate) 274void LLWLParamManager::loadPreset(const std::string & name,bool propagate)
275{ 275{
276 276 // Check if we already have the preset before we try loading it again.
277 if(mParamList.find(name) != mParamList.end())
278 {
279 if(propagate)
280 {
281 getParamSet(name, mCurParams);
282 propagateParameters();
283 }
284 return;
285 }
286
277 // bugfix for SL-46920: preventing filenames that break stuff. 287 // bugfix for SL-46920: preventing filenames that break stuff.
278 char * curl_str = curl_escape(name.c_str(), name.size()); 288 char * curl_str = curl_escape(name.c_str(), name.size());
279 std::string escaped_filename(curl_str); 289 std::string escaped_filename(curl_str);
@@ -662,9 +672,15 @@ void LLWLParamManager::loadWindlightNotecard(LLVFS *vfs, const LLUUID& asset_id,
662 notecard.importStream(str); 672 notecard.importStream(str);
663 std::string settings = notecard.getText(); 673 std::string settings = notecard.getText();
664 LLMemoryStream settings_str((U8*)settings.c_str(), settings.length()); 674 LLMemoryStream settings_str((U8*)settings.c_str(), settings.length());
675 bool is_animator_running = sInstance->mAnimator.mIsRunning;
676 bool animator_linden_time = sInstance->mAnimator.mUseLindenTime;
677 sInstance->mAnimator.mIsRunning = false;
678 sInstance->mAnimator.mUseLindenTime = false;
665 bool is_real_setting = sInstance->loadPresetXML(name, settings_str, true, true); 679 bool is_real_setting = sInstance->loadPresetXML(name, settings_str, true, true);
666 if(!is_real_setting) 680 if(!is_real_setting)
667 { 681 {
682 sInstance->mAnimator.mIsRunning = is_animator_running;
683 sInstance->mAnimator.mUseLindenTime = animator_linden_time;
668 LLSD subs; 684 LLSD subs;
669 subs["NAME"] = name; 685 subs["NAME"] = name;
670 LLNotifications::getInstance()->add("KittyInvalidWindlightNotecard", subs); 686 LLNotifications::getInstance()->add("KittyInvalidWindlightNotecard", subs);