From 00c4dabc2ba4052f66654c871f82f90e21500d9d Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan <dzaporozhan@productengine.com> Date: Thu, 18 Mar 2010 17:32:44 +0200 Subject: [PATCH] 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 --- indra/newview/llfloaterbuy.cpp | 3 ++- indra/newview/llinventorybridge.cpp | 7 +++++-- indra/newview/llpanelobjectinventory.cpp | 16 ++++++++++++---- indra/newview/llviewertexteditor.cpp | 5 ++++- .../default/textures/icons/Inv_Object_Multi.png | Bin 0 -> 774 bytes .../newview/skins/default/textures/textures.xml | 1 + 6 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Inv_Object_Multi.png 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 0000000000000000000000000000000000000000..11f4871ad8d1c3514209072be9f91cc11d4451c6 GIT binary patch literal 774 zcmV+h1Nr=kP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000XT000XT0n*)m`~Uy|9CSrkbW?9;ba!ELWdK2BZ(?O2Mrm?o zcW-iQb09-gGzPNMpa1{>6?8>dbVG7wVRUJ4ZXi@?ZDjy6FEKYSF))!U7@q(D0$)i) zK~y-6b(76Ylu;CipL6dW9Y-f8Q%oaEYEdy%i>XDLP(dvUD#D;P1?_4T^Z~8f^alh5 zuG)kJEu>Wt5fq4lLG}e&L6{-tj59el&O6TgzW26hswthbyF5S6f#>oQR+#h0dOJ6) z($jtGW7KPSI_2?YKG=Ed;qaUPvr_#yb!boWKu6?y&!(ost&Jus*5LrHg<LUoL+|tN z$8zDh`;SLn{<Gjxf8X&`d)?*kL}Zt8&J<^hbhJfjS{+3MzNL$N{92%+tC@I%;zQ1# z9GflQ7@6`O$Uy&|!QN!zXnQ=;SbZ^@_j&a(j}Ah*Hpb~*8>5<M3IT(oSxjfiKi&Fu z0k1uVX|7zHS!DY2JX5nJwj`o-<vhHIEaUO{5+<;YFk2$Xl?YZx8P6{<GgCkUi?0kp zNKNjE!3cmB#6d9Ukxnn-M2HxLxQe72Tv<>SsF%M%Z4@G4fDo`!n>)ZPT4BN}I<eFV zXuv5Un`mV3))pF!@O-ksHor{FI&|gxzSl(v$_~?{9Nji#Dul8U3h@SZBwN^2Wqoto z8Zz@fPu}GSw5Aw_G#8i9)ehDw2m;H37B<$f{ykHoH3-lmn2G}vRvh^5*P_6$ZQWM} zZ4{w(7{CJRQJ($J78$odU6m{mA)NC_PyfI<Fco>f9elEC;%yi?_@@ik_N7kljd9y^ zwDvU$1q;4&yvP(OTSo&hX%#Uo*>`1i@y_VmyUWT1aHc19<U~RSl2O)a9K-1%o^{Mv zH9Zzat_+R7zPD0?m(A6EsSA&fq}<Kkq&vHN`^8$hpDPYA)*b*EZ~y=R07*qoM6N<$ Ef_YU>$N&HU literal 0 HcmV?d00001 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" /> -- GitLab