diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-10-19 18:57:42 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-10-19 18:57:42 -0700 |
commit | 832a509c38035447ece2d0ae77c8661311e72d7e (patch) | |
tree | 1e78dc70bb8b7a0e5edbffe35bf1917a7dcd21ef /indra/newview/lltoolmgr.cpp | |
parent | eedc8687b0d05a14e41f1601d2ee615c69d132d0 (diff) |
EXP-1377 FIX Build tools 3 way toggle closes build floater when minimized
Diffstat (limited to 'indra/newview/lltoolmgr.cpp')
-rw-r--r-- | indra/newview/lltoolmgr.cpp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 51c0e2eeed..6bc7c6de11 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -247,24 +247,10 @@ bool LLToolMgr::canEdit() void LLToolMgr::toggleBuildMode() { - 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); - LLFloaterReg::hideInstance("build"); - gViewerWindow->showCursor(); - } - // avoid spurious avatar movements pulling out of edit mode - LLViewerJoystick::getInstance()->setNeedsReset(); - } - else + LLFloaterReg::toggleInstanceOrBringToFront("build"); + + bool build_visible = LLFloaterReg::instanceVisible("build"); + if (build_visible) { ECameraMode camMode = gAgentCamera.getCameraMode(); if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode) @@ -291,7 +277,7 @@ void LLToolMgr::toggleBuildMode() } } - + setCurrentToolset(gBasicToolset); getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); @@ -304,6 +290,24 @@ void LLToolMgr::toggleBuildMode() 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); + LLFloaterReg::hideInstance("build"); + gViewerWindow->showCursor(); + } + // avoid spurious avatar movements pulling out of edit mode + LLViewerJoystick::getInstance()->setNeedsReset(); + } + } bool LLToolMgr::inBuildMode() |