summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-03-18 17:32:44 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-03-18 17:32:44 +0200
commit00c4dabc2ba4052f66654c871f82f90e21500d9d (patch)
tree8283cea682faade74806612df2e2881b0c6f9194
parent40e7a65c698665a8b1db128412bce8332f888875 (diff)
Fixed major bug EXT-2707 - Coalesced objects do not show the proper icon in inventory.
Added new icon for multi-objects. New icon is used in inventory, object inventory and buy floater. New icon can not be used in Group Notices because server does not send enough info in GroupNoticesListReply. --HG-- branch : product-engine
-rw-r--r--indra/newview/llfloaterbuy.cpp3
-rw-r--r--indra/newview/llinventorybridge.cpp7
-rw-r--r--indra/newview/llpanelobjectinventory.cpp16
-rw-r--r--indra/newview/llviewertexteditor.cpp5
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Object_Multi.pngbin0 -> 774 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
6 files changed, 24 insertions, 8 deletions
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index fba557c656..589f570d96 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -246,7 +246,8 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
// Compute icon for this item
BOOL item_is_multi = FALSE;
- if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED )
+ if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED
+ || inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
{
item_is_multi = TRUE;
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1f918c72ea..6fedd9ac4d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -103,7 +103,7 @@ std::string ICON_NAME[ICON_NAME_COUNT] =
"Inv_Script",
"Inv_Clothing",
"Inv_Object",
- "Inv_Object",
+ "Inv_Object_Multi",
"Inv_Notecard",
"Inv_Skin",
"Inv_Snapshot",
@@ -5358,7 +5358,10 @@ LLUIImagePtr LLLinkItemBridge::getIcon() const
{
if (LLViewerInventoryItem *item = getItem())
{
- return get_item_icon(item->getActualType(), item->getInventoryType(), 0, FALSE);
+ U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags
+ bool is_multi = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags();
+
+ return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi);
}
return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE);
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 7505581904..69b8571bfb 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1188,7 +1188,8 @@ public:
LLTaskObjectBridge(
LLPanelObjectInventory* panel,
const LLUUID& uuid,
- const std::string& name);
+ const std::string& name,
+ U32 flags = 0);
virtual LLUIImagePtr getIcon() const;
};
@@ -1196,8 +1197,9 @@ public:
LLTaskObjectBridge::LLTaskObjectBridge(
LLPanelObjectInventory* panel,
const LLUUID& uuid,
- const std::string& name) :
- LLTaskInvFVBridge(panel, uuid, name)
+ const std::string& name,
+ U32 flags) :
+ LLTaskInvFVBridge(panel, uuid, name, flags)
{
}
@@ -1442,9 +1444,15 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory*
// object->getName());
break;
case LLAssetType::AT_OBJECT:
+ {
+ item = dynamic_cast<LLInventoryItem*>(object);
+ U32 flags = ( NULL == item ? 0 : item->getFlags() );
+
new_bridge = new LLTaskObjectBridge(panel,
object->getUUID(),
- object->getName());
+ object->getName(),
+ flags);
+ }
break;
case LLAssetType::AT_NOTECARD:
new_bridge = new LLTaskNotecardBridge(panel,
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index ea8af223c3..c9b3886fef 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -524,7 +524,10 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const
break;
case LLAssetType::AT_SOUND: img_name = "Inv_Sound"; break;
case LLAssetType::AT_CLOTHING: img_name = "Inv_Clothing"; break;
- case LLAssetType::AT_OBJECT: img_name = "Inv_Object"; break;
+ case LLAssetType::AT_OBJECT:
+ img_name = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags() ?
+ "Inv_Object_Multi" : "Inv_Object";
+ break;
case LLAssetType::AT_CALLINGCARD: img_name = "Inv_CallingCard"; break;
case LLAssetType::AT_LANDMARK: img_name = "Inv_Landmark"; break;
case LLAssetType::AT_NOTECARD: img_name = "Inv_Notecard"; break;
diff --git a/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png b/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png
new file mode 100644
index 0000000000..11f4871ad8
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index b1594816b2..a3e5361e76 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -247,6 +247,7 @@ with the same filename but different name
<texture name="Inv_Landmark" file_name="icons/Inv_Landmark.png" preload="false" />
<texture name="Inv_Notecard" file_name="icons/Inv_Notecard.png" preload="false" />
<texture name="Inv_Object" file_name="icons/Inv_Object.png" preload="false" />
+ <texture name="Inv_Object_Multi" file_name="icons/Inv_Object_Multi.png" preload="false" />
<texture name="Inv_Pants" file_name="icons/Inv_Pants.png" preload="false" />
<texture name="Inv_Script" file_name="icons/Inv_Script.png" preload="false" />
<texture name="Inv_Shirt" file_name="icons/Inv_Shirt.png" preload="false" />