diff options
author | Jacek Antonelli | 2008-12-08 02:17:06 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-12-08 02:17:06 -0600 |
commit | ecfb4c73e006d33a72f03ce9db2db550737d14c2 (patch) | |
tree | d73b27ff0289ad1b3e3e4bfc8210fc53bd3a3593 /linden/indra/llinventory/llinventory.cpp | |
parent | Added LLInventoryItem::recalcNInventoryType(). (diff) | |
download | meta-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 '')
-rw-r--r-- | linden/indra/llinventory/llinventory.cpp | 9 |
1 files changed, 9 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 | ||
408 | LLInventoryItem::LLInventoryItem() : | 409 | LLInventoryItem::LLInventoryItem() : |
@@ -531,9 +532,16 @@ void LLInventoryItem::setPermissions(const LLPermissions& perm) | |||
531 | mPermissions = perm; | 532 | mPermissions = perm; |
532 | } | 533 | } |
533 | 534 | ||
535 | void LLInventoryItem::setType(LLAssetType::EType type) | ||
536 | { | ||
537 | mType = type; | ||
538 | recalcNInventoryType(); | ||
539 | } | ||
540 | |||
534 | void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type) | 541 | void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type) |
535 | { | 542 | { |
536 | mInventoryType = inv_type; | 543 | mInventoryType = inv_type; |
544 | recalcNInventoryType(); | ||
537 | } | 545 | } |
538 | 546 | ||
539 | void LLInventoryItem::setNInventoryType(LLInventoryType::NType inv_type) | 547 | void LLInventoryItem::setNInventoryType(LLInventoryType::NType inv_type) |
@@ -544,6 +552,7 @@ void LLInventoryItem::setNInventoryType(LLInventoryType::NType inv_type) | |||
544 | void LLInventoryItem::setFlags(U32 flags) | 552 | void LLInventoryItem::setFlags(U32 flags) |
545 | { | 553 | { |
546 | mFlags = flags; | 554 | mFlags = flags; |
555 | recalcNInventoryType(); | ||
547 | } | 556 | } |
548 | 557 | ||
549 | void LLInventoryItem::setCreationDate(time_t creation_date_utc) | 558 | void LLInventoryItem::setCreationDate(time_t creation_date_utc) |