Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
d68f4ff6
Commit
d68f4ff6
authored
12 years ago
by
Merov Linden
Browse files
Options
Downloads
Patches
Plain Diff
CHUI-659 : WIP : Reimplemented favorite landmark sorting to follow favorites bar index sorting.
parent
3d0ec3da
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llfolderviewmodelinventory.cpp
+23
-30
23 additions, 30 deletions
indra/newview/llfolderviewmodelinventory.cpp
with
23 additions
and
30 deletions
indra/newview/llfolderviewmodelinventory.cpp
+
23
−
30
View file @
d68f4ff6
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include
"llinventorymodelbackgroundfetch.h"
#include
"llinventorymodelbackgroundfetch.h"
#include
"llinventorypanel.h"
#include
"llinventorypanel.h"
#include
"lltooldraganddrop.h"
#include
"lltooldraganddrop.h"
#include
"llfavoritesbar.h"
//
//
// class LLFolderViewModelInventory
// class LLFolderViewModelInventory
...
@@ -236,39 +237,31 @@ const LLFolderViewModelInventory* LLInventoryPanel::getFolderViewModel() const
...
@@ -236,39 +237,31 @@ const LLFolderViewModelInventory* LLInventoryPanel::getFolderViewModel() const
bool
LLInventorySort
::
operator
()(
const
LLFolderViewModelItemInventory
*
const
&
a
,
const
LLFolderViewModelItemInventory
*
const
&
b
)
const
bool
LLInventorySort
::
operator
()(
const
LLFolderViewModelItemInventory
*
const
&
a
,
const
LLFolderViewModelItemInventory
*
const
&
b
)
const
{
{
// ignore sort order for landmarks in the Favorites folder.
// Ignore sort order for landmarks in the Favorites folder.
// they should be always sorted as in Favorites bar. See EXT-719
// In that folder, landmarks should be always sorted as in the Favorites bar. See EXT-719
//TODO RN: fix sorting in favorites folder
if
(
a
->
getSortGroup
()
==
SG_ITEM
//if (a->getSortGroup() == SG_ITEM
&&
b
->
getSortGroup
()
==
SG_ITEM
// && b->getSortGroup() == SG_ITEM
&&
a
->
getInventoryType
()
==
LLInventoryType
::
IT_LANDMARK
// && a->getInventoryType() == LLInventoryType::IT_LANDMARK
&&
b
->
getInventoryType
()
==
LLInventoryType
::
IT_LANDMARK
)
// && b->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
//{
static
const
LLUUID
&
favorites_folder_id
=
gInventory
.
findCategoryUUIDForType
(
LLFolderType
::
FT_FAVORITE
);
// If both landmarks are in the favorite folder...
// static const LLUUID& favorites_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
if
(
gInventory
.
isObjectDescendentOf
(
a
->
getUUID
(),
favorites_folder_id
)
&&
gInventory
.
isObjectDescendentOf
(
b
->
getUUID
(),
favorites_folder_id
))
{
// LLUUID a_uuid = a->getParentFolder()->getUUID();
// Get their index in that folder
// LLUUID b_uuid = b->getParentFolder()->getUUID();
S32
a_sort
=
LLFavoritesOrderStorage
::
instance
().
getSortIndex
(
a
->
getUUID
());
S32
b_sort
=
LLFavoritesOrderStorage
::
instance
().
getSortIndex
(
b
->
getUUID
());
// if ((a_uuid == favorites_folder_id && b_uuid == favorites_folder_id))
// Note: since there are both in the favorite, we shouldn't get negative index value...
// {
if
(
!
((
a_sort
<
0
)
&&
(
b_sort
<
0
)))
// // *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem
{
// // or to LLInvFVBridge
return
a_sort
<
b_sort
;
// LLViewerInventoryItem* aitem = (static_cast<const LLItemBridge*>(a))->getItem();
}
// LLViewerInventoryItem* bitem = (static_cast<const LLItemBridge*>(b))->getItem();
}
// if (!aitem || !bitem)
}
// return false;
// S32 a_sort = aitem->getSortField();
// S32 b_sort = bitem->getSortField();
// return a_sort < b_sort;
// }
//}
// We sort by name if we aren't sorting by date
// We sort by name if we aren't sorting by date
// OR if these are folders and we are sorting folders by name.
// OR if these are folders and we are sorting folders by name.
bool
by_name
=
(
!
mByDate
bool
by_name
=
(
!
mByDate
||
(
mFoldersByName
&&
(
a
->
getSortGroup
()
!=
SG_ITEM
)));
||
(
mFoldersByName
&&
(
a
->
getSortGroup
()
!=
SG_ITEM
)));
if
(
a
->
getSortGroup
()
!=
b
->
getSortGroup
())
if
(
a
->
getSortGroup
()
!=
b
->
getSortGroup
())
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment