summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-17 20:13:31 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-17 20:13:31 -0500
commita34c89df8724cc625b7e1383c12df43fc627d772 (patch)
treebb451b90874c8e0e6f2e39546f95d57d5a08f1a4 /indra/newview/llinventorybridge.cpp
parentceee6c3e5ecfdcb8c310b613e3edb7b094289adf (diff)
EXT-1916 : Landmarks are not sorted in the Favorites Bar accordion
Sorting was fixed when LLFolderViewFolder was added back into the inventory panels. This checkin additionally allows sorting in the landmarks inventory panel.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 2afe48bc8a..93da313f27 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2852,9 +2852,11 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
const LLUUID& favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
-
+ const LLUUID& landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
+ const BOOL folder_allows_reorder = ((mUUID == landmarks_id) || (mUUID == favorites_id));
+
// we can move item inside a folder only if this folder is Favorites. See EXT-719
- accept = is_movable && ((mUUID != inv_item->getParentUUID()) || (mUUID == favorites_id));
+ accept = is_movable && ((mUUID != inv_item->getParentUUID()) || folder_allows_reorder);
if(accept && drop)
{
if (inv_item->getType() == LLAssetType::AT_GESTURE
@@ -2877,12 +2879,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
// if dragging from/into favorites folder only reorder items
- if ((mUUID == inv_item->getParentUUID()) && (favorites_id == mUUID))
+ if ((mUUID == inv_item->getParentUUID()) && folder_allows_reorder)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
LLIsType is_type(LLAssetType::AT_LANDMARK);
- model->collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
+ model->collectDescendentsIf(mUUID, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;