summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-04-06 22:03:58 -0700
committerMerov Linden <merov@lindenlab.com>2014-04-06 22:03:58 -0700
commita38bc63da24994b51cfd3487d4011c8e608cd41d (patch)
tree5eeb5030a8e6db90eae6cf1570ddcef548169f67 /indra/newview/llinventoryfunctions.cpp
parente1d2f71d348bafe0be783dcb3dfbeb56bc877c12 (diff)
DD-15 : Allow version folder to be made active/inactive, add new methods to marketplace to make all that a bit more clear and clean
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index e57519d67a..aef3bc9cca 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -125,8 +125,11 @@ void update_marketplace_category(const LLUUID& cat_id)
// for all observers of the folder to, possibly, change the display label of said folder.
// At least that's the status for the moment so, even if that function seems small, we
// prefer to encapsulate that behavior here.
- gInventory.addChangedMask(LLInventoryObserver::LABEL, cat_id);
- gInventory.notifyObservers();
+ if (cat_id.notNull())
+ {
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, cat_id);
+ gInventory.notifyObservers();
+ }
}
void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::string& new_name)
@@ -732,6 +735,19 @@ S32 depth_nesting_in_marketplace(LLUUID cur_uuid)
return depth;
}
+LLUUID nested_parent_id(LLUUID cur_uuid, S32 depth)
+{
+ LLInventoryObject* cur_object = gInventory.getObject(cur_uuid);
+ cur_uuid = (depth < 1 ? LLUUID::null : cur_uuid);
+ while (depth > 1)
+ {
+ depth--;
+ cur_uuid = cur_object->getParentUUID();
+ cur_object = gInventory.getCategory(cur_uuid);
+ }
+ return cur_uuid;
+}
+
void move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
{
// Get the marketplace listings, exit with error if none