From f040942f190cfdf10ee577a9b4f6a5c83e752e00 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 9 Feb 2010 15:55:33 -0800 Subject: EXT-4449 [BSI] Zoom In does not function properly on large or linked prim sets reviewed by Richard CC#99 --- indra/newview/llviewermenu.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a83baf7f9a..6bf9c993e0 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5332,7 +5332,7 @@ class LLWorldCreateLandmark : public view_listener_t void handle_look_at_selection(const LLSD& param) { - const F32 PADDING_FACTOR = 2.f; + const F32 PADDING_FACTOR = 1.75f; BOOL zoom = (param.asString() == "zoom"); if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) { @@ -5352,14 +5352,19 @@ void handle_look_at_selection(const LLSD& param) } if (zoom) { + // Make sure we are not increasing the distance between the camera and object + LLVector3d orig_distance = gAgent.getCameraPositionGlobal() - LLSelectMgr::getInstance()->getSelectionCenterGlobal(); + distance = llmin(distance, (F32) orig_distance.length()); + gAgent.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), - LLSelectMgr::getInstance()->getSelectionCenterGlobal(), - object_id ); + LLSelectMgr::getInstance()->getSelectionCenterGlobal(), + object_id ); + } else { gAgent.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), object_id ); - } + } } } -- cgit v1.2.3 From 21020ef48031a15b751ed5c66dafafda066f5487 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 9 Feb 2010 21:22:37 -0500 Subject: EXT-3071 : CTRL+I should bring up either inventorySP or inventory floater EXT-5239 : Consider removing CTRL+I to spawn multiple inventory windows BTEST-42 : Can't hide inventory by pressing CTRL+I CTRL+I will now either open the inventory sidepanel, or close the sidepanel. --- indra/newview/llviewermenu.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6bf9c993e0..8aae90ec3c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5630,14 +5630,15 @@ class LLShowSidetrayPanel : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string panel_name = userdata.asString(); - // Open up either the sidepanel or new floater. - if (LLSideTray::getInstance()->isPanelActive(panel_name)) + // Toggle the panel + if (!LLSideTray::getInstance()->isPanelActive(panel_name)) { - LLFloaterInventory::showAgentInventory(); + // LLFloaterInventory::showAgentInventory(); + LLSideTray::getInstance()->showPanel(panel_name, LLSD()); } else { - LLSideTray::getInstance()->showPanel(panel_name, LLSD()); + LLSideTray::getInstance()->collapseSideBar(); } return true; } -- cgit v1.2.3