diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 718c1c22516c1993a4cd165f507fcc971475654d..060bb4c6b940a14593c533f0ea9b6e1c5bfaca9d 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -262,6 +262,7 @@ void LLAgentWearables::AddWearableToAgentInventoryCallback::fire(const LLUUID& i { LLAppearanceMgr::instance().addCOFItemLink(inv_item, new LLUpdateAppearanceAndEditWearableOnDestroy(inv_item), mDescription); + editWearable(inv_item); } } @@ -432,7 +433,7 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, // old_wearable may still be referred to by other inventory items. Revert // unsaved changes so other inventory items aren't affected by the changes // that were just saved. - old_wearable->revertValues(); + old_wearable->revertValues(false); } void LLAgentWearables::revertWearable(const LLWearableType::EType type, const U32 index) diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 86135ee6e83a0df031548f01b87b12e6dd7b0ece..f07f0ed86c76bf6cd7315b13b5ed2c81c495cb13 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -383,7 +383,7 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearable *wearable, BOOL disable_camera_switch) { - if (!mEditWearable || mEditWearable->getVisible() == visible) + if (!mEditWearable || ((mEditWearable->getWearable() == wearable) && mEditWearable->getVisible() == visible)) { // visibility isn't changing, hence nothing to do return; diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp index 0f73515b5d8331909708758fa9a2baa8b14425b0..1fa8884b9d3218c0e8c5d70049c6ffc449a4836a 100644 --- a/indra/newview/llviewerwearable.cpp +++ b/indra/newview/llviewerwearable.cpp @@ -451,7 +451,7 @@ void LLViewerWearable::copyDataFrom(const LLViewerWearable* src) // Probably reduntant, but ensure that the newly created wearable is not dirty by setting current value of params in new wearable // to be the same as the saved values (which were loaded from src at param->cloneParam(this)) - revertValues(); + revertValues(false); } void LLViewerWearable::setItemID(const LLUUID& item_id) @@ -459,13 +459,13 @@ void LLViewerWearable::setItemID(const LLUUID& item_id) mItemID = item_id; } -void LLViewerWearable::revertValues() +void LLViewerWearable::revertValues(bool update_panel) { LLWearable::revertValues(); LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance")); - if( panel ) + if( panel && update_panel) { panel->updateScrollingPanelList(); } diff --git a/indra/newview/llviewerwearable.h b/indra/newview/llviewerwearable.h index 62cd5e21add899551997d32ba06a1b773e315f4a..6f116d3226243863817f3ab04d116c6fc406217d 100644 --- a/indra/newview/llviewerwearable.h +++ b/indra/newview/llviewerwearable.h @@ -82,7 +82,7 @@ class LLViewerWearable : public LLWearable friend std::ostream& operator<<(std::ostream &s, const LLViewerWearable &w); - /*virtual*/ void revertValues(); + /*virtual*/ void revertValues(bool update_panel = true); /*virtual*/ void saveValues(); // Something happened that requires the wearable's label to be updated (e.g. worn/unworn).