From 94e6e10739c8321b6fb651a109901380ef92975a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 12:00:26 -0400 Subject: EXT-6536 : Make LLVOAvatarSelf a singleton Superficial cleanup to replace all instances of "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject" with "gAgentAvatar". --- indra/newview/llpaneleditwearable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpaneleditwearable.cpp') diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index e7acc68b93..89fd4715fc 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -602,7 +602,7 @@ LLPanel* LLPanelEditWearable::getPanel(EWearableType type) void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std::string &edit_group) { LLWearable::visual_param_vec_t param_list; - ESex avatar_sex = gAgent.getAvatarObject()->getSex(); + ESex avatar_sex = gAgentAvatar->getSex(); mWearablePtr->getVisualParams(param_list); -- cgit v1.2.3 From 58d76a9ecf83b49e42fabfada27ca20814f93cf3 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 12:11:51 -0400 Subject: EXT-6536 : Make LLVOAvatarSelf a singleton Superficial cleanup to replace all instances of "gAgentAvatar" with "gAgentAvatarp". --- indra/newview/llpaneleditwearable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpaneleditwearable.cpp') diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 89fd4715fc..805016f089 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -602,7 +602,7 @@ LLPanel* LLPanelEditWearable::getPanel(EWearableType type) void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std::string &edit_group) { LLWearable::visual_param_vec_t param_list; - ESex avatar_sex = gAgentAvatar->getSex(); + ESex avatar_sex = gAgentAvatarp->getSex(); mWearablePtr->getVisualParams(param_list); -- cgit v1.2.3 From 3c036ef49b1e8690f5efe29393a4990e117e5bfe Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 1 Apr 2010 17:41:47 +0300 Subject: (work in progress) EXT-6564(major) - Fix wearable editing panels Fixed Edit Shape panel layout: - fixed widget positioning according to spec - added gear button bar - fixed accordion positioning - fixed parameter list positioning TODO: - fix parameter panel positioning - apply changes to the rest of wearable panels Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/149/ --HG-- branch : product-engine --- indra/newview/llpaneleditwearable.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview/llpaneleditwearable.cpp') diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 805016f089..c0528da999 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -489,7 +489,6 @@ void LLPanelEditWearable::initializePanel() updateScrollingPanelUI(); } - } void LLPanelEditWearable::updateScrollingPanelUI() @@ -640,14 +639,9 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value { LLPanel::Params p; p.name("LLScrollingPanelParam"); - p.rect(LLRect(0, LLScrollingPanelParam::PARAM_PANEL_HEIGHT, LLScrollingPanelParam::PARAM_PANEL_WIDTH, 0 )); LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable()); height = panel_list->addPanel( panel_param ); } - - S32 width = tab->getRect().getWidth(); - - tab->reshape(width,height + tab->getHeaderHeight()+10,FALSE); } } -- cgit v1.2.3 From 05a4e9dd8bb13caadd25ef3e71aab43e9b857cd1 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 7 Apr 2010 10:45:39 +0300 Subject: (work in progress) EXT-6564(major) - Fix wearable editing panels. Updated layout of all Edit Wearable panels. Disabled editing of no-modify wearable. Disabled "Save As" for no-copy wearable. Reviewed by Mike Antipov https://codereview.productengine.com/secondlife/r/170/ --HG-- branch : product-engine --- indra/newview/llpaneleditwearable.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpaneleditwearable.cpp') 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 -- cgit v1.2.3