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
e07bc619
Commit
e07bc619
authored
10 years ago
by
Merov Linden
Browse files
Options
Downloads
Patches
Plain Diff
DD-322 : Use vector of UUIDs instead of pointers to items when reparenting those items
parent
36d85815
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llinventoryfunctions.cpp
+5
-4
5 additions, 4 deletions
indra/newview/llinventoryfunctions.cpp
with
5 additions
and
4 deletions
indra/newview/llinventoryfunctions.cpp
+
5
−
4
View file @
e07bc619
...
@@ -1619,7 +1619,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
...
@@ -1619,7 +1619,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
// * have stock items nested at depth 2 at least
// * have stock items nested at depth 2 at least
// * never ever move the non-stock items
// * never ever move the non-stock items
std
::
vector
<
std
::
vector
<
LL
ViewerInventoryItem
*
>
>
items_vector
;
std
::
vector
<
std
::
vector
<
LL
UUID
>
>
items_vector
;
items_vector
.
resize
(
LLInventoryType
::
IT_COUNT
+
1
);
items_vector
.
resize
(
LLInventoryType
::
IT_COUNT
+
1
);
// Parse the items and create vectors of items to sort copyable items and stock items of various types
// Parse the items and create vectors of items to sort copyable items and stock items of various types
...
@@ -1649,7 +1649,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
...
@@ -1649,7 +1649,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
// Get the item type for stock items
// Get the item type for stock items
type
=
viewer_inv_item
->
getInventoryType
();
type
=
viewer_inv_item
->
getInventoryType
();
}
}
items_vector
[
type
].
push_back
(
viewer_inv_item
);
items_vector
[
type
].
push_back
(
viewer_inv_item
->
getUUID
()
);
}
}
// How many types of folders? Which type is it if only one?
// How many types of folders? Which type is it if only one?
...
@@ -1725,7 +1725,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
...
@@ -1725,7 +1725,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
{
{
// Create a new folder
// Create a new folder
LLUUID
parent_uuid
=
(
depth
>
2
?
viewer_cat
->
getParentUUID
()
:
viewer_cat
->
getUUID
());
LLUUID
parent_uuid
=
(
depth
>
2
?
viewer_cat
->
getParentUUID
()
:
viewer_cat
->
getUUID
());
LLViewerInventoryItem
*
viewer_inv_item
=
items_vector
[
i
].
back
();
LLViewerInventoryItem
*
viewer_inv_item
=
gInventory
.
getItem
(
items_vector
[
i
].
back
()
)
;
std
::
string
folder_name
=
(
depth
>
1
?
viewer_cat
->
getName
()
:
viewer_inv_item
->
getName
());
std
::
string
folder_name
=
(
depth
>
1
?
viewer_cat
->
getName
()
:
viewer_inv_item
->
getName
());
LLFolderType
::
EType
new_folder_type
=
(
i
==
LLInventoryType
::
IT_COUNT
?
LLFolderType
::
FT_NONE
:
LLFolderType
::
FT_MARKETPLACE_STOCK
);
LLFolderType
::
EType
new_folder_type
=
(
i
==
LLInventoryType
::
IT_COUNT
?
LLFolderType
::
FT_NONE
:
LLFolderType
::
FT_MARKETPLACE_STOCK
);
if
(
cb
)
if
(
cb
)
...
@@ -1742,10 +1742,11 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
...
@@ -1742,10 +1742,11 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
cb
(
message
,
depth
,
LLError
::
LEVEL_WARN
);
cb
(
message
,
depth
,
LLError
::
LEVEL_WARN
);
}
}
LLUUID
folder_uuid
=
gInventory
.
createNewCategory
(
parent_uuid
,
new_folder_type
,
folder_name
);
LLUUID
folder_uuid
=
gInventory
.
createNewCategory
(
parent_uuid
,
new_folder_type
,
folder_name
);
// Move each item to the new folder
// Move each item to the new folder
while
(
!
items_vector
[
i
].
empty
())
while
(
!
items_vector
[
i
].
empty
())
{
{
LLViewerInventoryItem
*
viewer_inv_item
=
items_vector
[
i
].
back
();
LLViewerInventoryItem
*
viewer_inv_item
=
gInventory
.
getItem
(
items_vector
[
i
].
back
()
)
;
if
(
cb
)
if
(
cb
)
{
{
std
::
string
message
=
indent
+
viewer_inv_item
->
getName
()
+
LLTrans
::
getString
(
"Marketplace Validation Warning Move"
);
std
::
string
message
=
indent
+
viewer_inv_item
->
getName
()
+
LLTrans
::
getString
(
"Marketplace Validation Warning Move"
);
...
...
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