From fbf5d1a99221d54c242b67ffcf13d5510b5ce0a7 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 15 Dec 2009 13:47:31 -0500 Subject: EXT-3304 : Can't reorder items in the Favorites accordions EXT-3476 : Dragging and item in the PlacesSP brings up the InventorySP EXT-1916 : Landmarks are not sorted in the Favorites Accordion Added a new LLInventoryObserver::SORT request for resorting folder contents. Landmarks no longer use the same sorting as accordions. --HG-- branch : avatar-pipeline --- indra/newview/llinventorypanel.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 92b9dc427f..ef7069195e 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -278,6 +278,7 @@ void LLInventoryPanel::modelChanged(U32 mask) const LLUUID& item_id = (*items_iter); const LLInventoryObject* model_item = model->getObject(item_id); LLFolderViewItem* view_item = mFolders->getItemByID(item_id); + LLFolderViewFolder* view_folder = mFolders->getFolderByID(item_id); ////////////////////////////// // LABEL Operation @@ -320,7 +321,18 @@ void LLInventoryPanel::modelChanged(U32 mask) view_item->refresh(); } } - + + ////////////////////////////// + // SORT Operation + // Sort the folder. + if (mask & LLInventoryObserver::SORT) + { + if (view_folder) + { + view_folder->requestSort(); + } + } + // We don't typically care which of these masks the item is actually flagged with, since the masks // may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into // Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks -- cgit v1.2.3 From a162d6afdae3c15641f90cee8aae29ea9e92dd98 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 15 Dec 2009 19:16:42 -0500 Subject: EXT-3304 : Can't reorder items in the Favorites accordions Fixed a bug where addChangedMask(LLInventoryObserver::SORT) was being called before the new sort order was established. --HG-- branch : avatar-pipeline --- indra/newview/llinventorypanel.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index ef7069195e..3c34ba32e2 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -397,16 +397,6 @@ void LLInventoryPanel::modelChanged(U32 mask) } } } - - /* I don't think we need this code, but not positive -- Seraph - if (!handled) - { - // It's a small change that only requires a refresh. - // *TODO: figure out a more efficient way to do the refresh - // since it is expensive on large inventories - mFolders->refresh(); - } - */ } // static -- cgit v1.2.3