diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-12-23 13:27:21 +0200 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-12-23 13:27:21 +0200 |
commit | 9fcdeae1ddd25cbff8fdb91337598bc84577084a (patch) | |
tree | 5d52ccef2f5fd793589c027e6a675ad8fe7d303f | |
parent | 797f221e6715f5b2423cd68e970b1f2ec2af7015 (diff) |
MAINT-4766 FIXED Reset camera to default after disabling Automatic position for: Appearance option.
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 598c7f9feb..0c669506fa 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -37,6 +37,7 @@ #include "message.h" #include "llfloaterautoreplacesettings.h" #include "llagent.h" +#include "llagentcamera.h" #include "llcheckboxctrl.h" #include "llcolorswatch.h" #include "llcombobox.h" @@ -74,6 +75,7 @@ #include "llviewermessage.h" #include "llviewershadermgr.h" #include "llviewerthrottle.h" +#include "llvoavatarself.h" #include "llvotree.h" #include "llvosky.h" #include "llfloaterpathfindingconsole.h" @@ -251,6 +253,14 @@ void handleDisplayNamesOptionChanged(const LLSD& newvalue) LLVOAvatar::invalidateNameTags(); } +void handleAppearanceCameraMovementChanged(const LLSD& newvalue) +{ + if(!newvalue.asBoolean() && gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) + { + gAgentCamera.changeCameraToDefault(); + gAgentCamera.resetView(); + } +} /*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) { @@ -361,6 +371,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2)); + gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged, _2)); + LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this ); mCommitCallbackRegistrar.add("Pref.ClearLog", boost::bind(&LLConversationLog::onClearLog, &LLConversationLog::instance())); |