aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-08 02:17:06 -0600
committerJacek Antonelli2008-12-08 02:17:06 -0600
commitecfb4c73e006d33a72f03ce9db2db550737d14c2 (patch)
treed73b27ff0289ad1b3e3e4bfc8210fc53bd3a3593 /linden/indra
parentAdded LLInventoryItem::recalcNInventoryType(). (diff)
downloadmeta-impy-ecfb4c73e006d33a72f03ce9db2db550737d14c2.zip
meta-impy-ecfb4c73e006d33a72f03ce9db2db550737d14c2.tar.gz
meta-impy-ecfb4c73e006d33a72f03ce9db2db550737d14c2.tar.bz2
meta-impy-ecfb4c73e006d33a72f03ce9db2db550737d14c2.tar.xz
Recalculate ntype when changing type or flags.
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/llinventory/llinventory.cpp9
-rw-r--r--linden/indra/llinventory/llinventory.h1
2 files changed, 10 insertions, 0 deletions
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(
403{ 403{
404 LLStringUtil::replaceNonstandardASCII(mDescription, ' '); 404 LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
405 LLStringUtil::replaceChar(mDescription, '|', ' '); 405 LLStringUtil::replaceChar(mDescription, '|', ' ');
406 recalcNInventoryType();
406} 407}
407 408
408LLInventoryItem::LLInventoryItem() : 409LLInventoryItem::LLInventoryItem() :
@@ -531,9 +532,16 @@ void LLInventoryItem::setPermissions(const LLPermissions& perm)
531 mPermissions = perm; 532 mPermissions = perm;
532} 533}
533 534
535void LLInventoryItem::setType(LLAssetType::EType type)
536{
537 mType = type;
538 recalcNInventoryType();
539}
540
534void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type) 541void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type)
535{ 542{
536 mInventoryType = inv_type; 543 mInventoryType = inv_type;
544 recalcNInventoryType();
537} 545}
538 546
539void LLInventoryItem::setNInventoryType(LLInventoryType::NType inv_type) 547void LLInventoryItem::setNInventoryType(LLInventoryType::NType inv_type)
@@ -544,6 +552,7 @@ void LLInventoryItem::setNInventoryType(LLInventoryType::NType inv_type)
544void LLInventoryItem::setFlags(U32 flags) 552void LLInventoryItem::setFlags(U32 flags)
545{ 553{
546 mFlags = flags; 554 mFlags = flags;
555 recalcNInventoryType();
547} 556}
548 557
549void LLInventoryItem::setCreationDate(time_t creation_date_utc) 558void 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:
253 void setDescription(const std::string& new_desc); 253 void setDescription(const std::string& new_desc);
254 void setSaleInfo(const LLSaleInfo& sale_info); 254 void setSaleInfo(const LLSaleInfo& sale_info);
255 void setPermissions(const LLPermissions& perm); 255 void setPermissions(const LLPermissions& perm);
256 void setType(LLAssetType::EType type);
256 void setInventoryType(LLInventoryType::EType inv_type); 257 void setInventoryType(LLInventoryType::EType inv_type);
257 void setNInventoryType(LLInventoryType::NType inv_type); 258 void setNInventoryType(LLInventoryType::NType inv_type);
258 void setFlags(U32 flags); 259 void setFlags(U32 flags);