diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-07-26 11:31:37 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-07-26 11:31:37 +0300 |
commit | c8d682484ca3822c1a873f40406dc770783d4f18 (patch) | |
tree | 288ce090f57718de663ea8e0950ee255aceac07a /indra | |
parent | ee51eee6275d6238a606da028a779bb07dc3b64c (diff) |
MAINT-6566 Avatar sliders display incorrect values immediately after saving a copy of the wearable.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerwearable.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerwearable.h | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 718c1c2251..060bb4c6b9 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 86135ee6e8..f07f0ed86c 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 0f73515b5d..1fa8884b9d 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 62cd5e21ad..6f116d3226 100644 --- a/indra/newview/llviewerwearable.h +++ b/indra/newview/llviewerwearable.h @@ -82,7 +82,7 @@ public: 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). |