summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2014-05-05 11:00:52 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2014-05-05 11:00:52 +0300
commitca967ce0a2e8fe6831c7e3496b786b07c0aef704 (patch)
tree0d957712a0692a3d6fd39f83f0ccf4b8fbc69ed3 /indra/newview/llfavoritesbar.cpp
parent61f126c289f741265ec7a407c946bf26979255b9 (diff)
MAINT-3974 FIXED Update and save favorites order when LLItemCopiedCallback is triggered.
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rwxr-xr-xindra/newview/llfavoritesbar.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index a2d0759587..046f3717c6 100755
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -327,6 +327,7 @@ public:
gInventory.updateItem(item);
gInventory.notifyObservers();
+ LLFavoritesOrderStorage::instance().saveOrder();
}
LLView::getWindow()->setCursor(UI_CURSOR_ARROW);
@@ -1641,6 +1642,16 @@ void LLFavoritesOrderStorage::cleanup()
mSortIndexes.swap(aTempMap);
}
+void LLFavoritesOrderStorage::saveOrder()
+{
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLIsType is_type(LLAssetType::AT_LANDMARK);
+ LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
+ gInventory.collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
+ saveItemsOrder(items);
+}
+
void LLFavoritesOrderStorage::saveItemsOrder( const LLInventoryModel::item_array_t& items )
{
int sortField = 0;