From 0b896a4953779c2f27c3418453e1a1a315ec111f Mon Sep 17 00:00:00 2001 From: prep Date: Wed, 12 Dec 2012 10:32:42 -0500 Subject: Fixes for SH-3591 & SH-3620 --- indra/newview/llpaneleditwearable.cpp | 10 ++++++++-- indra/newview/llpaneleditwearable.h | 1 + indra/newview/llsidepanelappearance.cpp | 5 +++++ 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 43344fd60e..87f9e3da59 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -718,8 +718,8 @@ BOOL LLPanelEditWearable::postBuild() mBtnBack = getChild("back_btn"); mBackBtnLabel = mBtnBack->getLabelUnselected(); mBtnBack->setLabel(LLStringUtil::null); - // handled at appearance panel level? - //mBtnBack->setClickedCallback(boost::bind(&LLPanelEditWearable::onBackButtonClicked, this)); + + mBtnBack->setClickedCallback(boost::bind(&LLPanelEditWearable::onBackButtonClicked, this)); mNameEditor = getChild("description"); @@ -872,6 +872,12 @@ void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_c showWearable(mWearablePtr, TRUE, disable_camera_switch); } +//static +void LLPanelEditWearable::onBackButtonClicked(void* userdata) +{ + LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata; + panel->saveChanges(true); +} //static void LLPanelEditWearable::onRevertButtonClicked(void* userdata) diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 309d512e23..515a9913b9 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -70,6 +70,7 @@ public: void updateScrollingPanelList(); static void onRevertButtonClicked(void* userdata); + static void onBackButtonClicked(void* userdata); void onCommitSexChange(); void onSaveAsButtonClicked(); void saveAsCallback(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 8c4a05b116..1fc10c2326 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -232,6 +232,11 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility) gAgentCamera.changeCameraToDefault(); gAgentCamera.resetView(); } + + if ( mEditWearable->getVisible() ) + { + mEditWearable->revertChanges(); + } } } -- cgit v1.2.3