MAINT-3974 FIXED Update and save favorites order when LLItemCopiedCallback is triggered.

master
Mnikolenko ProductEngine 2014-05-05 11:00:52 +03:00
parent 61f126c289
commit ca967ce0a2
2 changed files with 13 additions and 0 deletions

View File

@ -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;

View File

@ -203,6 +203,8 @@ public:
// Is used to save order for Favorites folder.
void saveItemsOrder(const LLInventoryModel::item_array_t& items);
void saveOrder();
void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id);
/**