diff options
author | James Cook <james@lindenlab.com> | 2010-06-01 14:33:44 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-06-01 14:33:44 -0700 |
commit | 49c221b9678c33d5dbe71a68ca35d0b28fff3edd (patch) | |
tree | 0214531fe7d433a220240b766d928f7a49e2ed92 /indra/newview/llinventorybridge.cpp | |
parent | 010dba68ad923cf66b1e05e6969a21f7288fe78a (diff) | |
parent | 7ea46b968cf7df3afc1e879f90f1124157f5a79d (diff) |
Merge with dessie/viewer-public in prep to land code there
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1b2d0be277..245a1e2064 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -42,7 +42,6 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llavataractions.h" -#include "llfloatercustomize.h" #include "llfloateropenobject.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" @@ -63,9 +62,11 @@ #include "llpreviewgesture.h" #include "llpreviewtexture.h" #include "llselectmgr.h" +#include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltrans.h" #include "llviewerassettype.h" +#include "llviewermenu.h" #include "llviewermessage.h" #include "llviewerobjectlist.h" #include "llviewerwindow.h" @@ -4454,15 +4455,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 @@ -4886,18 +4885,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); } } |