diff options
-rw-r--r-- | linden/indra/newview/llinventorybridge.cpp | 61 | ||||
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 8 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml | 3 |
3 files changed, 67 insertions, 5 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 4a5ad67..30b0a4a 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -53,6 +53,7 @@ | |||
53 | #include "llfloaterchat.h" | 53 | #include "llfloaterchat.h" |
54 | #include "llfloatercustomize.h" | 54 | #include "llfloatercustomize.h" |
55 | #include "llfloaterproperties.h" | 55 | #include "llfloaterproperties.h" |
56 | #include "llfloatertools.h" | ||
56 | #include "llfloaterworldmap.h" | 57 | #include "llfloaterworldmap.h" |
57 | #include "llfocusmgr.h" | 58 | #include "llfocusmgr.h" |
58 | #include "llfolderview.h" | 59 | #include "llfolderview.h" |
@@ -72,10 +73,14 @@ | |||
72 | #include "llresmgr.h" | 73 | #include "llresmgr.h" |
73 | #include "llscrollcontainer.h" | 74 | #include "llscrollcontainer.h" |
74 | #include "llimview.h" | 75 | #include "llimview.h" |
76 | #include "lltoolcomp.h" | ||
75 | #include "lltooldraganddrop.h" | 77 | #include "lltooldraganddrop.h" |
78 | #include "lltoolmgr.h" | ||
76 | #include "llviewerimagelist.h" | 79 | #include "llviewerimagelist.h" |
77 | #include "llviewerinventory.h" | 80 | #include "llviewerinventory.h" |
81 | #include "llviewerjoystick.h" | ||
78 | #include "llviewerobjectlist.h" | 82 | #include "llviewerobjectlist.h" |
83 | #include "llviewerparcelmgr.h" | ||
79 | #include "llviewerwindow.h" | 84 | #include "llviewerwindow.h" |
80 | #include "llvoavatar.h" | 85 | #include "llvoavatar.h" |
81 | #include "llwaterparammanager.h" | 86 | #include "llwaterparammanager.h" |
@@ -3493,6 +3498,55 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model | |||
3493 | llwarns << "object not found - ignoring" << llendl; | 3498 | llwarns << "object not found - ignoring" << llendl; |
3494 | } | 3499 | } |
3495 | } | 3500 | } |
3501 | else if ("edit" == action) | ||
3502 | { | ||
3503 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
3504 | return; | ||
3505 | LLVOAvatar* avatarp = gAgent.getAvatarObject(); | ||
3506 | if (!avatarp) | ||
3507 | return; | ||
3508 | LLViewerObject* objectp = avatarp->getWornAttachment(mUUID); | ||
3509 | if (!objectp) | ||
3510 | return; | ||
3511 | |||
3512 | // [Selective copy/paste from LLObjectEdit::handleEvent()] | ||
3513 | LLViewerParcelMgr::getInstance()->deselectLand(); | ||
3514 | LLSelectMgr::getInstance()->deselectAll(); | ||
3515 | |||
3516 | if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) | ||
3517 | { | ||
3518 | if (objectp->isHUDAttachment() || !gSavedSettings.getBOOL("EditCameraMovement")) | ||
3519 | { | ||
3520 | // always freeze camera in space, even if camera doesn't move | ||
3521 | // so, for example, follow cam scripts can't affect you when in build mode | ||
3522 | gAgent.setFocusGlobal(gAgent.calcFocusPositionTargetGlobal(), LLUUID::null); | ||
3523 | gAgent.setFocusOnAvatar(FALSE, ANIMATE); | ||
3524 | } | ||
3525 | else | ||
3526 | { | ||
3527 | gAgent.setFocusOnAvatar(FALSE, ANIMATE); | ||
3528 | |||
3529 | // zoom in on object center instead of where we clicked, as we need to see the manipulator handles | ||
3530 | gAgent.setFocusGlobal(objectp->getPositionGlobal(), objectp->getID()); | ||
3531 | gAgent.cameraZoomIn(0.666f); | ||
3532 | gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); | ||
3533 | gViewerWindow->moveCursorToCenter(); | ||
3534 | } | ||
3535 | } | ||
3536 | |||
3537 | gFloaterTools->open(); | ||
3538 | |||
3539 | LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); | ||
3540 | gFloaterTools->setEditTool( LLToolCompTranslate::getInstance() ); | ||
3541 | |||
3542 | LLViewerJoystick::getInstance()->moveObjects(true); | ||
3543 | LLViewerJoystick::getInstance()->setNeedsReset(true); | ||
3544 | |||
3545 | LLSelectMgr::getInstance()->selectObjectAndFamily(objectp); | ||
3546 | |||
3547 | // Could be first use | ||
3548 | LLFirstUse::useBuild(); | ||
3549 | } | ||
3496 | else LLItemBridge::performAction(folder, model, action); | 3550 | else LLItemBridge::performAction(folder, model, action); |
3497 | } | 3551 | } |
3498 | 3552 | ||
@@ -3654,9 +3708,15 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3654 | return; | 3708 | return; |
3655 | } | 3709 | } |
3656 | 3710 | ||
3711 | items.push_back(std::string("Attach Separator")); | ||
3657 | if( avatarp->isWearingAttachment( mUUID ) ) | 3712 | if( avatarp->isWearingAttachment( mUUID ) ) |
3658 | { | 3713 | { |
3659 | items.push_back(std::string("Detach From Yourself")); | 3714 | items.push_back(std::string("Detach From Yourself")); |
3715 | items.push_back(std::string("Attachment Edit")); | ||
3716 | if ( ( (flags & FIRST_SELECTED_ITEM) == 0) || (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ) | ||
3717 | { | ||
3718 | disabled_items.push_back(std::string("Attachment Edit")); | ||
3719 | } | ||
3660 | 3720 | ||
3661 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a | 3721 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
3662 | if ( (rlv_handler_t::isEnabled()) && | 3722 | if ( (rlv_handler_t::isEnabled()) && |
@@ -3669,7 +3729,6 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3669 | else | 3729 | else |
3670 | if( !isInTrash() ) | 3730 | if( !isInTrash() ) |
3671 | { | 3731 | { |
3672 | items.push_back(std::string("Attach Separator")); | ||
3673 | items.push_back(std::string("Object Wear")); | 3732 | items.push_back(std::string("Object Wear")); |
3674 | items.push_back(std::string("Attach To")); | 3733 | items.push_back(std::string("Attach To")); |
3675 | items.push_back(std::string("Attach To HUD")); | 3734 | items.push_back(std::string("Attach To HUD")); |
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index 952121f..939d50b 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -578,11 +578,11 @@ void LLInventoryView::init(LLInventoryModel* inventory) | |||
578 | std::ostringstream filterSaveName; | 578 | std::ostringstream filterSaveName; |
579 | filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); | 579 | filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); |
580 | llinfos << "LLInventoryView::init: reading from " << filterSaveName << llendl; | 580 | llinfos << "LLInventoryView::init: reading from " << filterSaveName << llendl; |
581 | llifstream file(filterSaveName.str()); | 581 | llifstream file(filterSaveName.str()); |
582 | LLSD savedFilterState; | 582 | LLSD savedFilterState; |
583 | if (file.is_open()) | 583 | if (file.is_open()) |
584 | { | 584 | { |
585 | LLSDSerialize::fromXML(savedFilterState, file); | 585 | LLSDSerialize::fromXML(savedFilterState, file); |
586 | file.close(); | 586 | file.close(); |
587 | 587 | ||
588 | // Load the persistent "Recent Items" settings. | 588 | // Load the persistent "Recent Items" settings. |
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml index 78fc75e..81b4ce2 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml | |||
@@ -249,6 +249,9 @@ | |||
249 | mouse_opaque="true" name="Detach From Yourself" width="128"> | 249 | mouse_opaque="true" name="Detach From Yourself" width="128"> |
250 | <on_click filter="" function="Inventory.DoToSelected" userdata="detach" /> | 250 | <on_click filter="" function="Inventory.DoToSelected" userdata="detach" /> |
251 | </menu_item_call> | 251 | </menu_item_call> |
252 | <menu_item_call bottom_delta="-18" height="18" label="Edit" left="0" mouse_opaque="true" name="Attachment Edit" width="128"> | ||
253 | <on_click filter="" function="Inventory.DoToSelected" userdata="edit" /> | ||
254 | </menu_item_call> | ||
252 | <!-- COMMENTED OUT for DEV-32347 --> | 255 | <!-- COMMENTED OUT for DEV-32347 --> |
253 | <!-- | 256 | <!-- |
254 | <menu_item_call bottom_delta="-18" height="18" label="Restore to Last Position" left="0" mouse_opaque="true" | 257 | <menu_item_call bottom_delta="-18" height="18" label="Restore to Last Position" left="0" mouse_opaque="true" |