summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-01-08 12:34:10 -0500
committerLoren Shih <seraph@lindenlab.com>2010-01-08 12:34:10 -0500
commita2d4b740ed1e633b1e479157b74fe3181beeaa2b (patch)
treebe0e0c108c85919876b33bbc96e46ed5e229014a /indra/newview
parent6abd41831a4cae5d757aa44675731d1fd48d64b1 (diff)
EXT-4089 : InventorySP File->Open doesn't open folders.
Includes some minor const correctness infrastructure changes.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfolderview.cpp7
-rw-r--r--indra/newview/llfolderview.h2
-rw-r--r--indra/newview/llfolderviewitem.h6
-rw-r--r--indra/newview/llinventorybridge.cpp7
4 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 41f4d1a663..1ea5868491 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -820,10 +820,11 @@ void LLFolderView::clearSelection()
mSelectThisID.setNull();
}
-BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection)
+BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection) const
{
- selected_items_t::iterator item_it;
- for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
+ for (selected_items_t::const_iterator item_it = mSelectedItems.begin();
+ item_it != mSelectedItems.end();
+ ++item_it)
{
selection.insert((*item_it)->getListener()->getUUID());
}
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 2598af4df4..89e1865e35 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -162,7 +162,7 @@ public:
virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items);
- virtual BOOL getSelectionList(std::set<LLUUID> &selection);
+ virtual BOOL getSelectionList(std::set<LLUUID> &selection) const;
// make sure if ancestor is selected, descendents are not
void sanitizeSelection();
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 6f8c738a59..03bb296d29 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -237,7 +237,7 @@ public:
virtual void recursiveDeselect(BOOL deselect_self);
// gets multiple-element selection
- virtual BOOL getSelectionList(std::set<LLUUID> &selection){return TRUE;}
+ virtual BOOL getSelectionList(std::set<LLUUID> &selection) const {return TRUE;}
// Returns true is this object and all of its children can be removed (deleted by user)
virtual BOOL isRemovable();
@@ -304,7 +304,7 @@ public:
// Show children (unfortunate that this is called "open")
virtual void setOpen(BOOL open = TRUE) {};
- virtual BOOL isOpen() { return FALSE; }
+ virtual BOOL isOpen() const { return FALSE; }
virtual LLFolderView* getRoot();
BOOL isDescendantOf( const LLFolderViewFolder* potential_ancestor );
@@ -499,7 +499,7 @@ public:
virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse = RECURSE_NO);
// Get the current state of the folder.
- virtual BOOL isOpen() { return mIsOpen; }
+ virtual BOOL isOpen() const { return mIsOpen; }
// special case if an object is dropped on the child.
BOOL handleDragAndDropFromChild(MASK mask,
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 4c868baa92..8c75635219 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2074,7 +2074,12 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
{
if ("open" == action)
{
- openItem();
+ LLFolderViewFolder *f = dynamic_cast<LLFolderViewFolder *>(folder->getItemByID(mUUID));
+ if (f)
+ {
+ f->setOpen(TRUE);
+ }
+
return;
}
else if ("paste" == action)