summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatercamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r--indra/newview/llfloatercamera.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index d574f1433f..3b192ff81b 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -457,6 +457,7 @@ void LLFloaterCamera::switchMode(ECameraControlMode mode)
switch (mode)
{
+ case CAMERA_CTRL_MODE_PRESETS:
case CAMERA_CTRL_MODE_PAN:
sFreeCamera = false;
clear_camera_tool();
@@ -467,13 +468,6 @@ void LLFloaterCamera::switchMode(ECameraControlMode mode)
activate_camera_tool();
break;
- case CAMERA_CTRL_MODE_PRESETS:
- if(sFreeCamera)
- {
- switchMode(CAMERA_CTRL_MODE_FREE_CAMERA);
- }
- break;
-
default:
//normally we won't occur here
llassert_always(FALSE);
@@ -528,7 +522,6 @@ void LLFloaterCamera::onClickCameraItem(const LLSD& param)
{
camera_floater->switchMode(CAMERA_CTRL_MODE_FREE_CAMERA);
camera_floater->updateItemsSelection();
- camera_floater->fromFreeToPresets();
}
}
else
@@ -586,15 +579,7 @@ void LLFloaterCamera::switchToPreset(const std::string& name)
if (camera_floater)
{
camera_floater->updateItemsSelection();
- camera_floater->fromFreeToPresets();
- }
-}
-
-void LLFloaterCamera::fromFreeToPresets()
-{
- if (!sFreeCamera && mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA && mPrevMode == CAMERA_CTRL_MODE_PRESETS)
- {
- switchMode(CAMERA_CTRL_MODE_PRESETS);
+ camera_floater->switchMode(CAMERA_CTRL_MODE_PRESETS);
}
}