diff options
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index b33dea4890..c85d048c5a 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -330,6 +330,10 @@ void LLFloaterCamera::onClose(bool app_quitting) //We don't care of camera mode if app is quitting if(app_quitting) return; + // It is necessary to reset mCurrMode to CAMERA_CTRL_MODE_PAN so + // to avoid seeing an empty floater when reopening the control. + if (mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA) + mCurrMode = CAMERA_CTRL_MODE_PAN; // When mCurrMode is in CAMERA_CTRL_MODE_PAN // switchMode won't modify mPrevMode, so force it here. // It is needed to correctly return to previous mode on open, see EXT-2727. @@ -346,7 +350,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) mCurrMode(CAMERA_CTRL_MODE_PAN), mPrevMode(CAMERA_CTRL_MODE_PAN) { - LLHints::registerHintTarget("view_popup", LLView::getHandle()); + LLHints::registerHintTarget("view_popup", getHandle()); mCommitCallbackRegistrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); } @@ -433,26 +437,6 @@ void LLFloaterCamera::setMode(ECameraControlMode mode) updateState(); } -void LLFloaterCamera::setModeTitle(const ECameraControlMode mode) -{ - std::string title; - switch(mode) - { - case CAMERA_CTRL_MODE_MODES: - title = getString("camera_modes_title"); - break; - case CAMERA_CTRL_MODE_PAN: - title = getString("pan_mode_title"); - break; - case CAMERA_CTRL_MODE_PRESETS: - title = getString("presets_mode_title"); - break; - default: - break; - } - setTitle(title); -} - void LLFloaterCamera::switchMode(ECameraControlMode mode) { setMode(mode); @@ -532,7 +516,6 @@ void LLFloaterCamera::updateState() { iter->second->setToggleState(iter->first == mCurrMode); } - setModeTitle(mCurrMode); } void LLFloaterCamera::updateItemsSelection() |