diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-04-07 12:20:26 +0300 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-04-07 12:20:26 +0300 |
commit | 5b8ea41e42dc7d9ea5d9a4c7bd477a88e62b8bf8 (patch) | |
tree | 57f1e8a2c196bc600ee27d69a4d16e798d425416 /indra/newview/llpaneleditwearable.cpp | |
parent | e8e1e87dd5c4f13a041c8d04311399a59447899d (diff) | |
parent | d4deaf6c9b631c5d59765967f6f715d2ed6eaf28 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index c0528da999..da74295f9e 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -270,6 +270,8 @@ LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part, LLPanelEditWearable::LLPanelEditWearable() : LLPanel() + , mWearablePtr(NULL) + , mWearableItem(NULL) { } @@ -338,8 +340,7 @@ BOOL LLPanelEditWearable::isDirty() const //virtual void LLPanelEditWearable::draw() { - BOOL is_dirty = isDirty(); - mBtnRevert->setEnabled(is_dirty); + updateVerbs(); LLPanel::draw(); } @@ -401,6 +402,9 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) return; } + mWearableItem = gInventory.getItem(mWearablePtr->getItemID()); + llassert(mWearableItem); + EWearableType type = wearable->getType(); LLPanel *targetPanel = NULL; std::string title; @@ -489,6 +493,7 @@ void LLPanelEditWearable::initializePanel() updateScrollingPanelUI(); } + updateVerbs(); } void LLPanelEditWearable::updateScrollingPanelUI() @@ -645,7 +650,19 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value } } +void LLPanelEditWearable::updateVerbs() +{ + bool can_copy = false; + if(mWearableItem) + { + can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID); + } + BOOL is_dirty = isDirty(); + mBtnRevert->setEnabled(is_dirty); + childSetEnabled("save_as_button", is_dirty && can_copy); +} +// EOF |