diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-01-15 18:02:42 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-01-15 18:02:42 +0200 |
commit | 6e67ac5e02e0e22433f679eff29a5426d3ace1be (patch) | |
tree | 6c39ddbe183e5ca7fb64837404212378798b98fa /indra/newview/llinventorymodel.h | |
parent | 7aa96279fe1a5391e1e276961bd9fb7cb81cf3a1 (diff) |
Fixed low bug EXT-4311 (Order of items in 'Favorites Bar' folder remains non-changed if change its order in the 'Favorites Bar')
-- reason: there was two places where identical resorting of Favorite landmarks functionality was implemented: InventoryBridge & Favorite bar.
It was not impelnmented properly in favorites bar: LLInventoryObserver::SORT flag was not set after d-n-d.
-- fix: moved identical functionality to update & save order of Favorite landmarks from these places to Inventory Panel
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llinventorymodel.h')
-rw-r--r-- | indra/newview/llinventorymodel.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 39377b4ae2..e8698c0759 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -384,6 +384,30 @@ public: void setLibraryOwnerID(const LLUUID& id); void setLibraryRootFolderID(const LLUUID& id); + + /** + * Changes items order by insertion of the item identified by src_item_id + * BEFORE the item identified by dest_item_id. Both items must exist in items array. + * + * Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id. + * + * @param[in, out] items - vector with items to be updated. It should be sorted in a right way + * before calling this method. + * @param src_item_id - LLUUID of inventory item to be moved in new position + * @param dest_item_id - LLUUID of inventory item before which source item should be placed. + */ + static void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id); + + /** + * Saves current order of the passed items using inventory item sort field. + * + * It reset items' sort fields and saves them on server. + * Is used to save order for Favorites folder. + * + * @param[in] items vector of items in order to be saved. + */ + void saveItemsOrder(const LLInventoryModel::item_array_t& items); + protected: // Internal methods which add inventory and make sure that all of |