View->Build menu selection now functions once more.

This commit is contained in:
Shyotl
2012-07-02 15:38:38 -05:00
parent d0668d818c
commit 9ddbc132bf
2 changed files with 21 additions and 20 deletions

View File

@@ -282,7 +282,24 @@ bool LLToolMgr::canEdit()
void LLToolMgr::toggleBuildMode() void LLToolMgr::toggleBuildMode()
{ {
if (!inBuildMode()) if (inBuildMode())
{
if (gSavedSettings.getBOOL("EditCameraMovement"))
{
// just reset the view, will pull us out of edit mode
handle_reset_view();
}
else
{
// manually disable edit mode, but do not affect the camera
gAgentCamera.resetView(false);
gFloaterTools->close();
gViewerWindow->showCursor();
}
// avoid spurious avatar movements pulling out of edit mode
LLViewerJoystick::getInstance()->setNeedsReset();
}
else
{ {
ECameraMode camMode = gAgentCamera.getCameraMode(); ECameraMode camMode = gAgentCamera.getCameraMode();
if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode) if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode)
@@ -332,24 +349,8 @@ void LLToolMgr::toggleBuildMode()
LLViewerJoystick::getInstance()->setNeedsReset(); LLViewerJoystick::getInstance()->setNeedsReset();
} }
else
{
if (gSavedSettings.getBOOL("EditCameraMovement"))
{
// just reset the view, will pull us out of edit mode
handle_reset_view();
}
else
{
// manually disable edit mode, but do not affect the camera
gAgentCamera.resetView(false);
gFloaterTools->close();
gViewerWindow->showCursor();
}
// avoid spurious avatar movements pulling out of edit mode
LLViewerJoystick::getInstance()->setNeedsReset();
}
} }
bool LLToolMgr::inBuildMode() bool LLToolMgr::inBuildMode()
{ {
// when entering mouselook inEdit() immediately returns true before // when entering mouselook inEdit() immediately returns true before

View File

@@ -875,8 +875,6 @@ void init_menus()
gLoginMenuBarView->setBackgroundColor( color ); gLoginMenuBarView->setBackgroundColor( color );
gMenuHolder->addChild(gLoginMenuBarView); gMenuHolder->addChild(gLoginMenuBarView);
LLToolMgr::getInstance()->initMenu(sMenus);
} }
@@ -9510,4 +9508,6 @@ void initialize_menus()
addMenu(new RlvEnableIfNot(), "RLV.EnableIfNot"); addMenu(new RlvEnableIfNot(), "RLV.EnableIfNot");
} }
// [/RLVa:KB] // [/RLVa:KB]
LLToolMgr::getInstance()->initMenu(sMenus);
} }