From ecfb4c73e006d33a72f03ce9db2db550737d14c2 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 8 Dec 2008 02:17:06 -0600 Subject: Recalculate ntype when changing type or flags. --- linden/indra/llinventory/llinventory.cpp | 9 +++++++++ linden/indra/llinventory/llinventory.h | 1 + 2 files changed, 10 insertions(+) (limited to 'linden') diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp index 8d8008e..0a8a1fb 100644 --- a/linden/indra/llinventory/llinventory.cpp +++ b/linden/indra/llinventory/llinventory.cpp @@ -403,6 +403,7 @@ LLInventoryItem::LLInventoryItem( { LLStringUtil::replaceNonstandardASCII(mDescription, ' '); LLStringUtil::replaceChar(mDescription, '|', ' '); + recalcNInventoryType(); } LLInventoryItem::LLInventoryItem() : @@ -531,9 +532,16 @@ void LLInventoryItem::setPermissions(const LLPermissions& perm) mPermissions = perm; } +void LLInventoryItem::setType(LLAssetType::EType type) +{ + mType = type; + recalcNInventoryType(); +} + void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type) { mInventoryType = inv_type; + recalcNInventoryType(); } void LLInventoryItem::setNInventoryType(LLInventoryType::NType inv_type) @@ -544,6 +552,7 @@ void LLInventoryItem::setNInventoryType(LLInventoryType::NType inv_type) void LLInventoryItem::setFlags(U32 flags) { mFlags = flags; + recalcNInventoryType(); } void LLInventoryItem::setCreationDate(time_t creation_date_utc) diff --git a/linden/indra/llinventory/llinventory.h b/linden/indra/llinventory/llinventory.h index 34d9445..c573f74 100644 --- a/linden/indra/llinventory/llinventory.h +++ b/linden/indra/llinventory/llinventory.h @@ -253,6 +253,7 @@ public: void setDescription(const std::string& new_desc); void setSaleInfo(const LLSaleInfo& sale_info); void setPermissions(const LLPermissions& perm); + void setType(LLAssetType::EType type); void setInventoryType(LLInventoryType::EType inv_type); void setNInventoryType(LLInventoryType::NType inv_type); void setFlags(U32 flags); -- cgit v1.1