diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5680b9b5a..9cdf831b8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -790,6 +790,17 @@ Value 0 + LiruMiniBuildFloater + + Comment + Whether or not the build tools floater is tinified (except in Land tool) + Persist + 1 + Type + Boolean + Value + 0 + LiruMouselookHidesFloaters Comment diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 062ada4ba..a690b42e5 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -829,7 +829,18 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) childSetVisible("link_num_obj_count", !land_visible); childSetVisible("prim_count", !land_visible); - mTab->setVisible(!land_visible); + static const LLCachedControl mini("LiruMiniBuildFloater"); + mTab->setVisible(!mini && !land_visible); + getChildView("mini_button")->setVisible(!land_visible); + bool small = mini && !land_visible; + const S32 cur_height = getRect().getHeight(); + static const S32 full_height = cur_height; + if (small == (cur_height == full_height)) + { + S32 new_height = small ? full_height - mTab->getRect().getHeight() + 8 : full_height; + translate(0, cur_height - new_height); + reshape(getRect().getWidth(), new_height); + } mPanelLandInfo->setVisible(land_visible); } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index f655834c1..4881139df 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6734,6 +6734,24 @@ void LLSelectMgr::doDelete() selectDelete(); } +// Note: Allow Ctrl-A for select all linked prims +//----------------------------------------------------------------------------- +// canSelectAll() +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::canSelectAll() const +{ + return !mSelectedObjects->isEmpty(); +} + +//----------------------------------------------------------------------------- +// selectAll() +//----------------------------------------------------------------------------- +void LLSelectMgr::selectAll() +{ + promoteSelectionToRoot(); +} +// + //----------------------------------------------------------------------------- // canDeselect() //----------------------------------------------------------------------------- diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index ce16d0569..16c960ba8 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -389,6 +389,9 @@ public: virtual BOOL canDoDelete() const; virtual void doDelete(); + virtual void selectAll(); + virtual BOOL canSelectAll() const; + virtual void deselect(); virtual BOOL canDeselect() const; diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 1f6ae81cf..2c442069e 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -50,7 +50,6 @@ #include "llagent.h" #include "llagentcamera.h" #include "llfloatertools.h" -#include "qtoolalign.h" #include "llviewercontrol.h" @@ -278,20 +277,13 @@ BOOL LLToolCompTranslate::handleMouseUp(S32 x, S32 y, MASK mask) LLTool* LLToolCompTranslate::getOverrideTool(MASK mask) { - if (gKeyboard->getKeyDown('A') && mask & MASK_CONTROL) + if (mask == MASK_CONTROL) { - return QToolAlign::getInstance(); + return LLToolCompRotate::getInstance(); } - else + else if (mask == (MASK_CONTROL | MASK_SHIFT)) { - if (mask == MASK_CONTROL) - { - return LLToolCompRotate::getInstance(); - } - else if (mask == (MASK_CONTROL | MASK_SHIFT)) - { - return LLToolCompScale::getInstance(); - } + return LLToolCompScale::getInstance(); } return LLToolComposite::getOverrideTool(mask); } @@ -404,11 +396,7 @@ BOOL LLToolCompScale::handleMouseUp(S32 x, S32 y, MASK mask) LLTool* LLToolCompScale::getOverrideTool(MASK mask) { - if (gKeyboard->getKeyDown('A') && mask & MASK_CONTROL) - { - return QToolAlign::getInstance(); - } - else if (mask == MASK_CONTROL) + if (mask == MASK_CONTROL) { return LLToolCompRotate::getInstance(); } @@ -607,11 +595,7 @@ BOOL LLToolCompRotate::handleMouseUp(S32 x, S32 y, MASK mask) LLTool* LLToolCompRotate::getOverrideTool(MASK mask) { - if (gKeyboard->getKeyDown('A') && mask & MASK_CONTROL) - { - return QToolAlign::getInstance(); - } - else if (mask == (MASK_CONTROL | MASK_SHIFT)) + if (mask == (MASK_CONTROL | MASK_SHIFT)) { return LLToolCompScale::getInstance(); } diff --git a/indra/newview/qtoolalign.cpp b/indra/newview/qtoolalign.cpp index 6afa97f07..2b09c7cf2 100644 --- a/indra/newview/qtoolalign.cpp +++ b/indra/newview/qtoolalign.cpp @@ -1,5 +1,5 @@ /** - * @file lltoolface.cpp + * @file qtoolalign.cpp * @brief A tool to align objects */ @@ -13,14 +13,11 @@ #include "v3math.h" // Viewer includes -#include "llagent.h" #include "llagentcamera.h" #include "llbox.h" #include "llcylinder.h" #include "llfloatertools.h" -#include "llmanip.h" #include "llselectmgr.h" -#include "lltoolcomp.h" #include "llviewercamera.h" #include "llviewercontrol.h" #include "llviewerobject.h" @@ -33,7 +30,7 @@ const F32 MANIPULATOR_SELECT_SIZE = 20.0; QToolAlign::QToolAlign() -: LLToolComposite(std::string("Align")) +: LLTool(std::string("Align")) { } @@ -48,51 +45,16 @@ BOOL QToolAlign::handleMouseDown(S32 x, S32 y, MASK mask) { if (mHighlightedAxis != -1) { - align(); + align(); } else { gViewerWindow->pickAsync(x, y, mask, pickCallback); } - + return TRUE; } -BOOL QToolAlign::handleMouseUp(S32 x, S32 y, MASK mask) -{ - // first, perform normal processing in case this was a quick-click - handleHover(x, y, mask); - LLSelectMgr::getInstance()->updateSelectionCenter(); - BOOL handled = FALSE; - if( hasMouseCapture() ) - { - handled = TRUE; - setMouseCapture( FALSE ); - } - return handled; -} - -BOOL QToolAlign::handleDoubleClick(S32 x, S32 y, MASK mask) -{ - return FALSE; -} - -LLTool* QToolAlign::getOverrideTool(MASK mask) -{ - if (!gKeyboard->getKeyDown('A')) - { - if (mask == MASK_CONTROL) - { - return LLToolCompRotate::getInstance(); - } - else if (mask == (MASK_CONTROL | MASK_SHIFT)) - { - return LLToolCompScale::getInstance(); - } - } - return LLToolComposite::getOverrideTool(mask); -} - void QToolAlign::pickCallback(const LLPickInfo& pick_info) { LLViewerObject* object = pick_info.getObject(); @@ -140,9 +102,8 @@ void QToolAlign::handleSelect() { // no parts, please - //llwarns << "in select" << llendl; + LL_DEBUGS("ALIGNTOOL") << "in select" << LL_ENDL; LLSelectMgr::getInstance()->promoteSelectionToRoot(); - LLSelectMgr::getInstance()->updateSelectionCenter(); gFloaterTools->setStatusText("align"); } @@ -151,6 +112,7 @@ void QToolAlign::handleDeselect() { } + BOOL QToolAlign::findSelectedManipulator(S32 x, S32 y) { mHighlightedAxis = -1; @@ -182,8 +144,9 @@ BOOL QToolAlign::findSelectedManipulator(S32 x, S32 y) } - F32 half_width = (F32)gViewerWindow->getWindowWidth() / 2.f; - F32 half_height = (F32)gViewerWindow->getWindowHeight() / 2.f; + LLRect world_view_rect = gViewerWindow->getWorldViewRectScaled(); + F32 half_width = (F32)world_view_rect.getWidth() / 2.f; + F32 half_height = (F32)world_view_rect.getHeight() / 2.f; LLVector2 manip2d; LLVector2 mousePos((F32)x - half_width, (F32)y - half_height); LLVector2 delta; @@ -416,25 +379,24 @@ void QToolAlign::render() LLColor4 default_normal_color( 0.7f, 0.7f, 0.7f, 0.1f ); gGL.color4fv( default_normal_color.mV ); - + // LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getEditSelection(); - BOOL can_move = selection->getObjectCount() != 0; - if (can_move) + if (selection->getObjectCount() == 0) return; + struct F : public LLSelectedObjectFunctor { - struct f : public LLSelectedObjectFunctor + virtual bool apply(LLViewerObject* objectp) { - virtual bool apply(LLViewerObject* objectp) - { - return objectp->permMove() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); - } - } func; - can_move = selection->applyToObjects(&func); - } - if (can_move) - { - render_bbox(mBBox); - renderManipulators(); - } + if (!objectp->permMove()) return false; + if (objectp->permModify()) return true; + static const LLCachedControl edit_linked("EditLinkedParts"); + return !edit_linked; + } + } f; + if (!selection->applyToObjects(&f)) return; + // + + render_bbox(mBBox); + renderManipulators(); } // only works for our specialized (AABB, position centered) bboxes @@ -564,7 +526,7 @@ void QToolAlign::align() // check to see if it overlaps the previously placed objects BOOL overlap = FALSE; - llwarns << "i=" << i << " j=" << j << llendl; + LL_DEBUGS("ALIGNTOOL") << "i=" << i << " j=" << j << LL_ENDL; if (!mForce) // well, don't check if in force mode { @@ -577,8 +539,8 @@ void QToolAlign::align() if (overlaps_this) { - llwarns << "overlap" << new_bbox.getCenterAgent() << other_bbox.getCenterAgent() << llendl; - llwarns << "extent" << new_bbox.getExtentLocal() << other_bbox.getExtentLocal() << llendl; + LL_DEBUGS("ALIGNTOOL") << "overlap" << new_bbox.getCenterAgent() << other_bbox.getCenterAgent() << LL_ENDL; + LL_DEBUGS("ALIGNTOOL") << "extent" << new_bbox.getExtentLocal() << other_bbox.getExtentLocal() << LL_ENDL; } overlap = (overlap || overlaps_this); diff --git a/indra/newview/qtoolalign.h b/indra/newview/qtoolalign.h index 1bef073ba..da70b34af 100644 --- a/indra/newview/qtoolalign.h +++ b/indra/newview/qtoolalign.h @@ -8,14 +8,13 @@ #include "lltool.h" #include "llbbox.h" -#include "lltoolcomp.h" class LLViewerObject; class LLPickInfo; class LLToolSelectRect; class QToolAlign -: public LLToolComposite, public LLSingleton +: public LLTool, public LLSingleton { public: QToolAlign(); @@ -24,13 +23,9 @@ public: virtual void handleSelect(); virtual void handleDeselect(); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); - virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual void render(); - virtual LLTool* getOverrideTool(MASK mask); - static void pickCallback(const LLPickInfo& pick_info); private: diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index e66cc3f77..b37289265 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -38,7 +38,7 @@ - + Lineal: diff --git a/indra/newview/skins/default/xui/en-us/floater_tools.xml b/indra/newview/skins/default/xui/en-us/floater_tools.xml index 9568791e7..c6f7658b3 100644 --- a/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -52,6 +52,7 @@ function="BuildTool.setTool" parameter="Land" /> +