From 6e67ac5e02e0e22433f679eff29a5426d3ace1be Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 15 Jan 2010 18:02:42 +0200 Subject: 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 --- indra/newview/llinventorymodel.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'indra/newview/llinventorymodel.h') 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 -- cgit v1.2.3