summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpaneleditwearable.cpp10
-rw-r--r--indra/newview/llpaneleditwearable.h1
-rw-r--r--indra/newview/llsidepanelappearance.cpp5
3 files changed, 14 insertions, 2 deletions
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<LLButton>("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<LLLineEditor>("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();
+ }
}
}