From b42efcfee36640fbded3c4116f8756e941b20d13 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Mon, 19 Apr 2010 13:00:12 +0300 Subject: Update for major task EXT-6564 - Fix wearable editing panels. Added temporary "edit" button to outfit list to allow QA test new wearable edit panels. Was not reviewed. --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index d78a448acb..847778f828 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -457,20 +457,18 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::dequegetLastSelectedItem(); if (!item) return; - LLRect rect = item->getRect(); - LLRect btn_rect( - left_offset + rect.mRight - 50, - top_offset + rect.mTop, - left_offset + rect.mRight - 30, - top_offset + rect.mBottom); + LLRect item_rect; + mLookContents->localRectToOtherView(item->getRect(), &item_rect, getChild("outfit_wearables_panel")); + + // TODO button(and item list) should be removed (when new widget is ready) + LLRect btn_rect = mEditWearableBtn->getRect(); + btn_rect.set(item_rect.mRight - btn_rect.getWidth(), item_rect.mTop, item_rect.mRight, item_rect.mBottom); - mEditWearableBtn->setRect(btn_rect); + mEditWearableBtn->setShape(btn_rect); mEditWearableBtn->setEnabled(TRUE); if (!mEditWearableBtn->getVisible()) -- cgit v1.2.3 From 71c7b2f6d76b29c527d07c01c52127bf4f5b402e Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 19 Apr 2010 13:23:24 +0300 Subject: completed EXT-6764 Implement filtering of wearables (combobox options: Clothes/Body, Objects, All) on Add to Outfit subpanel Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/221/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 847778f828..ba6473839a 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -133,10 +133,6 @@ mRemoveFromOutfitBtn(NULL), mLookObserver(NULL) mLookItemTypes.push_back(LLLookItemType()); } - // TODO: make these strings translatable - mLookItemTypes[LIT_ALL] = LLLookItemType("All Items", ALL_ITEMS_MASK); - mLookItemTypes[LIT_WEARABLE] = LLLookItemType("Shape & Clothing", WEARABLE_MASK); - mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType("Attachments", ATTACHMENT_MASK); } @@ -159,10 +155,15 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit() BOOL LLPanelOutfitEdit::postBuild() { // gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels - + + mLookItemTypes[LIT_ALL] = LLLookItemType(getString("Filter.All"), ALL_ITEMS_MASK); + mLookItemTypes[LIT_WEARABLE] = LLLookItemType(getString("Filter.Clothes/Body"), WEARABLE_MASK); + mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); + mCurrentOutfitName = getChild("curr_outfit_name"); childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL); + childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); mLookContents = getChild("look_items_list"); mLookContents->sortByColumn("look_item_sort", TRUE); @@ -174,7 +175,7 @@ BOOL LLPanelOutfitEdit::postBuild() mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); - LLComboBox* type_filter = getChild("inventory_filter"); + LLComboBox* type_filter = getChild("filter_wearables_combobox"); type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1)); type_filter->removeall(); for (U32 i = 0; i < mLookItemTypes.size(); ++i) @@ -236,6 +237,11 @@ void LLPanelOutfitEdit::showAddWearablesPanel() childSetVisible("add_wearables_panel", childGetValue("add_btn")); } +void LLPanelOutfitEdit::showWearablesFilter() +{ + childSetVisible("filter_combobox_panel", childGetValue("filter_button")); +} + void LLPanelOutfitEdit::saveOutfit(bool as_new) { if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit()) -- cgit v1.2.3