diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfolderview.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llfolderview.h | 2 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.h | 2 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llwearabletype.h | 2 |
12 files changed, 25 insertions, 28 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index eba4cdfa31..2ae11aa2b5 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -846,16 +846,16 @@ void LLFolderView::clearSelection() mSelectThisID.setNull(); } -BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection) const +std::set<LLUUID> LLFolderView::getSelectionList() const { + std::set<LLUUID> selection; for (selected_items_t::const_iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { selection.insert((*item_it)->getListener()->getUUID()); } - - return (selection.size() != 0); + return selection; } BOOL LLFolderView::startDrag(LLToolDragAndDrop::ESource source) @@ -2070,8 +2070,7 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) } - std::set<LLUUID> selected_items; - getSelectionList(selected_items); + std::set<LLUUID> selected_items = getSelectionList(); LLMultiPreview* multi_previewp = NULL; LLMultiProperties* multi_propertiesp = NULL; diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 38d7a47eba..0dfdbd364b 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -164,7 +164,7 @@ public: virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items); - virtual BOOL getSelectionList(std::set<LLUUID> &selection) const; + virtual std::set<LLUUID> getSelectionList() const; // make sure if ancestor is selected, descendents are not void sanitizeSelection(); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index fd5fafdfe5..54e9bd5383 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -387,6 +387,12 @@ void LLFolderViewItem::extendSelectionFromRoot(LLFolderViewItem* selection) getRoot()->extendSelection(selection, NULL, selected_items); } +std::set<LLUUID> LLFolderViewItem::getSelectionList() const +{ + std::set<LLUUID> selection; + return selection; +} + EInventorySortGroup LLFolderViewItem::getSortGroup() const { return SG_ITEM; diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 655ad89e99..57c722afa4 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -231,7 +231,7 @@ public: virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items){ return FALSE; } // gets multiple-element selection - virtual BOOL getSelectionList(std::set<LLUUID> &selection) const {return TRUE;} + virtual std::set<LLUUID> getSelectionList() const; // Returns true is this object and all of its children can be removed (deleted by user) virtual BOOL isRemovable(); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index dd1e039cb1..000bcdd265 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -775,8 +775,7 @@ void LLInventoryPanel::doCreate(const LLSD& userdata) bool LLInventoryPanel::beginIMSession() { - std::set<LLUUID> selected_items; - mFolderRoot->getSelectionList(selected_items); + std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); std::string name; static int session_num = 1; @@ -873,8 +872,7 @@ bool LLInventoryPanel::beginIMSession() bool LLInventoryPanel::attachObject(const LLSD& userdata) { - std::set<LLUUID> selected_items; - mFolderRoot->getSelectionList(selected_items); + std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); std::string joint_name = userdata.asString(); LLViewerJointAttachment* attachmentp = NULL; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index bcc852cf4c..6634bc948d 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -993,8 +993,8 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } else if("create_pick" == command_name) { - std::set<LLUUID> selection; - if ( mCurrentSelectedList && mCurrentSelectedList->getRootFolder()->getSelectionList(selection) ) + std::set<LLUUID> selection = mCurrentSelectedList->getRootFolder()->getSelectionList(); + if ( mCurrentSelectedList && !selection.empty() ) { return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a84280c213..327196d9ba 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1099,8 +1099,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (root) { can_delete = TRUE; - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); if (selection_set.empty()) return FALSE; for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 6a112f35dd..de16f9d343 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1489,7 +1489,7 @@ void LLPanelObjectInventory::updateInventory() BOOL inventory_has_focus = FALSE; if (mHaveInventory) { - mFolders->getSelectionList(selected_items); + selected_items = mFolders->getSelectionList(); inventory_has_focus = gFocusMgr.childHasKeyboardFocus(mFolders); } diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 111894b31c..660615df5a 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -493,8 +493,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) LLFolderView* root = getActivePanel()->getRootFolder(); if (root) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); can_delete = (selection_set.size() > 0); for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -515,8 +514,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) LLFolderView* root = getActivePanel()->getRootFolder(); if (root) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); can_delete = (selection_set.size() > 0); for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -568,8 +566,7 @@ bool LLPanelOutfitsInventory::hasItemsSelected() LLFolderView* root = getActivePanel()->getRootFolder(); if (root) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); has_items_selected = (selection_set.size() > 0); } } diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index fa543f1371..65b9184fe5 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -323,8 +323,7 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem() U32 LLSidepanelInventory::getSelectedCount() { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); - std::set<LLUUID> selection_list; - panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(selection_list); + std::set<LLUUID> selection_list = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(); return selection_list.size(); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 28c1a1ad3a..4b7c7f297b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -796,7 +796,7 @@ private: mSelectedItems.clear(); if (mActivePanel) { - mActivePanel->getRootFolder()->getSelectionList(mSelectedItems); + mSelectedItems = mActivePanel->getRootFolder()->getSelectionList(); } mSelectedItems.erase(mMoveIntoFolderID); } @@ -829,8 +829,7 @@ private: } // get selected items (without destination folder) - selected_items_t selected_items; - mActivePanel->getRootFolder()->getSelectionList(selected_items); + selected_items_t selected_items = mActivePanel->getRootFolder()->getSelectionList(); selected_items.erase(mMoveIntoFolderID); // compare stored & current sets of selected items diff --git a/indra/newview/llwearabletype.h b/indra/newview/llwearabletype.h index b0326ce0d8..e6d955b6d5 100644 --- a/indra/newview/llwearabletype.h +++ b/indra/newview/llwearabletype.h @@ -59,7 +59,7 @@ public: WT_TATTOO = 14, WT_COUNT = 15, - WT_NONE = -1, + WT_NONE = 255, }; static const std::string& getTypeName(EType type); |