summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-07-02 09:12:33 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-07-02 09:12:33 +0100
commit2dc929b3863abfdce53aac4f737226a4d9bc25f8 (patch)
tree9100025712ae9e4deda3d41bcccb8bc5e221e4d3 /indra
parentee7fce63fe706734b5931fb9d2bb351c0be71c83 (diff)
parent4081f6f5844d4846162727682206440859fd4dc4 (diff)
merge from PE's viewer-release
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llcofwearables.cpp16
-rw-r--r--indra/newview/lloutfitslist.cpp17
-rw-r--r--indra/newview/lloutfitslist.h4
-rw-r--r--indra/newview/lltexturectrl.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/panel_cof_wearables.xml5
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml8
6 files changed, 36 insertions, 19 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index cbebc93306..472d2ccf24 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -167,10 +167,18 @@ public:
protected:
static void replaceWearable()
{
- static LLButton* show_add_wearables_btn =
- LLSideTray::getInstance()->getChild<LLButton>("show_add_wearables_btn");
-
- show_add_wearables_btn->onCommit();
+ // *TODO: Most probable that accessing to LLPanelOutfitEdit instance should be:
+ // LLSideTray::getInstance()->getSidepanelAppearance()->getPanelOutfitEdit()
+ // without casting. Getter methods provides possibility to check and construct
+ // absent instance. Explicit relations between components avoids situations
+ // when we tries to construct instance with unsatisfied implicit input conditions.
+ LLPanelOutfitEdit * panel_outfit_edit =
+ dynamic_cast<LLPanelOutfitEdit*> (LLSideTray::getInstance()->getPanel(
+ "panel_outfit_edit"));
+ if (panel_outfit_edit != NULL)
+ {
+ panel_outfit_edit->showAddWearablesPanel(true);
+ }
}
/*virtual*/ LLContextMenu* createMenu()
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 23c7e64cce..dddfd9106f 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -657,10 +657,10 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata)
}
if (command_name == "take_off")
{
- // Enable "Take Off" only if a worn item or base outfit is selected.
- return ( !hasItemSelected()
- && LLAppearanceMgr::getInstance()->getBaseOutfitUUID() == mSelectedOutfitUUID )
- || hasWornItemSelected();
+ // Enable "Take Off" if any of selected items can be taken off
+ // or the selected outfit contains items that can be taken off.
+ return ( hasItemSelected() && canTakeOffSelected() )
+ || ( !hasItemSelected() && LLAppearanceMgr::getCanRemoveFromCOF(mSelectedOutfitUUID) );
}
if (command_name == "wear_add")
@@ -955,14 +955,19 @@ void LLOutfitsList::applyFilterToTab(
}
}
-bool LLOutfitsList::hasWornItemSelected()
+bool LLOutfitsList::canTakeOffSelected()
{
uuid_vec_t selected_uuids;
getSelectedItemsUUIDs(selected_uuids);
+ LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false);
+
for (uuid_vec_t::const_iterator it=selected_uuids.begin(); it != selected_uuids.end(); ++it)
{
- if (get_is_item_worn(*it)) return true;
+ LLViewerInventoryItem* item = gInventory.getItem(*it);
+ if (!item) continue;
+
+ if (is_worn(NULL, item)) return true;
}
return false;
}
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 26722f2a96..d7cf8a8c08 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -179,9 +179,9 @@ private:
void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring);
/**
- * Returns true if there are any worn items among currently selected, otherwise false.
+ * Returns true if there are any items that can be taken off among currently selected, otherwise false.
*/
- bool hasWornItemSelected();
+ bool canTakeOffSelected();
void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id);
void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 0b86cefa1d..fcb9deb20b 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -423,8 +423,9 @@ BOOL LLFloaterTexturePicker::postBuild()
mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
mInventoryPanel->setAllowMultiSelect(FALSE);
- // store this filter as the default one
- mInventoryPanel->getRootFolder()->getFilter()->markDefault();
+ // Commented out to scroll to currently selected texture. See EXT-5403.
+ // // store this filter as the default one
+ // mInventoryPanel->getRootFolder()->getFilter()->markDefault();
// Commented out to stop opening all folders with textures
// mInventoryPanel->openDefaultFolderForType(LLFolderType::FT_TEXTURE);
diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
index d2c8ab159f..d5943ea156 100644
--- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
+++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
@@ -35,7 +35,10 @@
multi_select="true"
name="list_attachments"
top="0"
- width="311" />
+ width="311">
+ <flat_list_view.no_items_text
+ value="No attachments worn" />
+ </flat_list_view>
</accordion_tab>
<accordion_tab
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index 10d8c7dbb8..02ab0ffee5 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -52,14 +52,14 @@ width="333">
visible="false" />
<icon
follows="top|left"
- height="32"
- image_name="TabIcon_Appearance_Off"
+ height="31"
+ image_name="Shirt_Large"
name="outfit_icon"
mouse_opaque="false"
visible="true"
- left="0"
+ left="1"
top="0"
- width="32" />
+ width="31" />
<text
font="SansSerifSmall"
text_color="EmphasisColor"