diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-17 20:13:31 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-17 20:13:31 -0500 |
commit | a34c89df8724cc625b7e1383c12df43fc627d772 (patch) | |
tree | bb451b90874c8e0e6f2e39546f95d57d5a08f1a4 | |
parent | ceee6c3e5ecfdcb8c310b613e3edb7b094289adf (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.
-rw-r--r-- | indra/llcommon/llfoldertype.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llcommon/llfoldertype.cpp index 079e670b1a..a5dd342be2 100644 --- a/indra/llcommon/llfoldertype.cpp +++ b/indra/llcommon/llfoldertype.cpp @@ -120,6 +120,8 @@ const std::string &LLFolderType::lookup(LLFolderType::EType folder_type) // you can't change certain properties such as their type. bool LLFolderType::lookupIsProtectedType(EType folder_type) { + return FALSE; + /* const LLFolderDictionary *dict = LLFolderDictionary::getInstance(); const FolderEntry *entry = dict->lookup(folder_type); if (entry) @@ -127,6 +129,7 @@ bool LLFolderType::lookupIsProtectedType(EType folder_type) return entry->mIsProtected; } return true; + */ } // static 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;
|