diff options
| author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-26 18:22:15 -0400 |
|---|---|---|
| committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-26 18:22:15 -0400 |
| commit | b2433a6c82980e76dfde8735d69b788d20abc9d8 (patch) | |
| tree | 56598d9bec26b54d3ba1a3896ac2cf52c2af139f /indra/newview/llinventorybridge.cpp | |
| parent | 14b8471d448a6e591ab29d25634a32d882853212 (diff) | |
| parent | ec7dbc704040dfcdcd101f090dbb2f780ca0ee8a (diff) | |
Automated merge with ssh://hg.lindenlab.com/dessie/viewer-public
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
| -rw-r--r-- | indra/newview/llinventorybridge.cpp | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 29865e420a..f3dfde03c3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -62,6 +62,7 @@ #include "llpreviewgesture.h" #include "llpreviewtexture.h" #include "llselectmgr.h" +#include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltrans.h" #include "llviewerassettype.h" @@ -4446,15 +4447,13 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category ) << " )" << llendl; - if( gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty( - boost::bind(remove_inventory_category_from_avatar_step2, _1, category->getUUID())); - } - else - { - remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + + remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); } struct OnRemoveStruct @@ -4878,18 +4877,12 @@ void LLWearableBridge::onEditOnAvatar(void* user_data) void LLWearableBridge::editOnAvatar() { - const LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); + LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); if( wearable ) { - // Set the tab to the right wearable. - if (gFloaterCustomize) - gFloaterCustomize->setCurrentWearableType( wearable->getType() ); + LLPanel * panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); - if( CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() ) - { - // Start Avatar Customization - gAgentCamera.changeCameraToCustomizeAvatar(); - } + LLSidepanelAppearance::editWearable(wearable, panel); } } |
