summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatercamera.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-06 13:35:54 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-06 13:35:54 -0800
commit9130cc471263dd982efb84136c8f79cc8e48f7e9 (patch)
treebe11bcefe3423fca99bc388e55878588ca9b501d /indra/newview/llfloatercamera.cpp
parent078278bf51b50ded63d5f7c4a9d99146f72aba69 (diff)
parent327069dcb8d71e2fb603c0ddf505d692de64e461 (diff)
Merge from viewer2 trunk again - some fairly important fixes there.
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r--indra/newview/llfloatercamera.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 764aff68c9..9496e94780 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -144,6 +144,11 @@ void LLPanelCameraZoom::onSliderValueChanged()
mSavedSliderVal = val;
}
+void activate_camera_tool()
+{
+ LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance());
+};
+
//
// Member functions
//
@@ -151,7 +156,7 @@ void LLPanelCameraZoom::onSliderValueChanged()
/*static*/ bool LLFloaterCamera::inFreeCameraMode()
{
LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
- if (floater_camera && floater_camera->mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA)
+ if (floater_camera && floater_camera->mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA && gAgent.getCameraMode() != CAMERA_MODE_MOUSELOOK)
{
return true;
}
@@ -177,27 +182,17 @@ void LLFloaterCamera::update()
}
-/*static*/ void LLFloaterCamera::updateIfNotInAvatarViewMode()
-{
- LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
- if (floater_camera && !floater_camera->inAvatarViewMode())
- {
- floater_camera->update();
- }
-}
-
-
void LLFloaterCamera::toPrevMode()
{
switchMode(mPrevMode);
}
-/*static*/ void LLFloaterCamera::toPrevModeIfInAvatarViewMode()
+/*static*/ void LLFloaterCamera::onLeavingMouseLook()
{
LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
- if (floater_camera && floater_camera->inAvatarViewMode())
+ if (floater_camera && floater_camera->inFreeCameraMode())
{
- floater_camera->toPrevMode();
+ activate_camera_tool();
}
}
@@ -325,7 +320,7 @@ void LLFloaterCamera::switchMode(ECameraControlMode mode)
break;
case CAMERA_CTRL_MODE_FREE_CAMERA:
- LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance());
+ activate_camera_tool();
break;
case CAMERA_CTRL_MODE_AVATAR_VIEW: