From 5285a7fa7ec67c2337c5f071e6785b143e24c9a6 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 1 Jul 2010 20:00:00 +0300 Subject: EXT-7565 FIXED Would be nice to preserve selection while switching between folder/list view modes - Created callback called 'SaveSelecton' (which preserves selection while switching between folder/list view modes) for folder/list view modes buttons in LLPanelOutfitEdit. - Added 'scrollToShowFirstSelectedItem' method in the LLFlatListView which scrools and shows the first selected item in case multiselection. - It's possible to set selection for flat list view items before list is build. The result is that any items will be selected. To get rid of it: 1. Overrided LLFlatListView::selectItemByValue method in LLInventoryItemsList so that if list is not created yet, items ids are saved to the vector. 2. Added 'LLInventoryItemsList::updateSelection()' method which selects items with ids from that vector when list is created. - A little refactoring: moved funcionality of updating WearablesPanel's verb buttons to the separate method called LLPanelOutfitEdit::updateWearablesPanelVerbButtons() to made code more readable and self-explanatory Reviewed by Vadim Savchuk and Neal Orman at https://codereview.productengine.com/secondlife/r/579/ --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llinventoryitemslist.h') diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index 71c7b6a675..5800111f46 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -68,6 +68,10 @@ public: */ void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; } + virtual bool selectItemByValue(const LLSD& value, bool select = true); + + void updateSelection(); + /** * Idle routine used to refresh the list regardless of the current list * visibility, unlike draw() which is called only for the visible list. @@ -104,6 +108,9 @@ protected: private: uuid_vec_t mIDs; // IDs of items that were added in refreshList(). // Will be used in refresh() to determine added and removed ids + + uuid_vec_t mSelectTheseIDs; // IDs that will be selected if list is not loaded till now + bool mNeedsRefresh; bool mForceRefresh; -- cgit v1.2.3