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
306cec78
Commit
306cec78
authored
8 years ago
by
andreykproductengine
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-7249 Fixing obsolete suffix for wearables that are no longer worn
parent
26809498
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/llappearancemgr.cpp
+35
-6
35 additions, 6 deletions
indra/newview/llappearancemgr.cpp
with
35 additions
and
6 deletions
indra/newview/llappearancemgr.cpp
+
35
−
6
View file @
306cec78
...
@@ -2917,11 +2917,32 @@ void LLAppearanceMgr::removeAllAttachmentsFromAvatar()
...
@@ -2917,11 +2917,32 @@ void LLAppearanceMgr::removeAllAttachmentsFromAvatar()
removeItemsFromAvatar
(
ids_to_remove
);
removeItemsFromAvatar
(
ids_to_remove
);
}
}
void
LLAppearanceMgr
::
removeCOFItemLinks
(
const
LLUUID
&
item_id
,
LLPointer
<
LLInventoryCallback
>
cb
)
class
LLUpdateOnCOFLinkRemove
:
public
LLInventoryCallback
{
{
gInventory
.
addChangedMask
(
LLInventoryObserver
::
LABEL
,
item_id
);
public:
LLUpdateOnCOFLinkRemove
(
const
LLUUID
&
remove_item_id
,
LLPointer
<
LLInventoryCallback
>
cb
=
NULL
)
:
mItemID
(
remove_item_id
),
mCB
(
cb
)
{
}
LLInventoryModel
::
cat_array_t
cat_array
;
/* virtual */
void
fire
(
const
LLUUID
&
item_id
)
{
// just removed cof link, "(wear)" suffix depends on presence of link, so update label
gInventory
.
addChangedMask
(
LLInventoryObserver
::
LABEL
,
mItemID
);
if
(
mCB
.
notNull
())
{
mCB
->
fire
(
item_id
);
}
}
private
:
LLUUID
mItemID
;
LLPointer
<
LLInventoryCallback
>
mCB
;
};
void
LLAppearanceMgr
::
removeCOFItemLinks
(
const
LLUUID
&
item_id
,
LLPointer
<
LLInventoryCallback
>
cb
)
{
LLInventoryModel
::
cat_array_t
cat_array
;
LLInventoryModel
::
item_array_t
item_array
;
LLInventoryModel
::
item_array_t
item_array
;
gInventory
.
collectDescendents
(
LLAppearanceMgr
::
getCOF
(),
gInventory
.
collectDescendents
(
LLAppearanceMgr
::
getCOF
(),
cat_array
,
cat_array
,
...
@@ -2932,12 +2953,20 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInve
...
@@ -2932,12 +2953,20 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInve
const
LLInventoryItem
*
item
=
item_array
.
at
(
i
).
get
();
const
LLInventoryItem
*
item
=
item_array
.
at
(
i
).
get
();
if
(
item
->
getIsLinkType
()
&&
item
->
getLinkedUUID
()
==
item_id
)
if
(
item
->
getIsLinkType
()
&&
item
->
getLinkedUUID
()
==
item_id
)
{
{
bool
immediate_delete
=
false
;
if
(
item
->
getType
()
==
LLAssetType
::
AT_OBJECT
)
if
(
item
->
getType
()
==
LLAssetType
::
AT_OBJECT
)
{
{
immediate_delete
=
true
;
// Immediate delete
remove_inventory_item
(
item
->
getUUID
(),
cb
,
true
);
gInventory
.
addChangedMask
(
LLInventoryObserver
::
LABEL
,
item_id
);
}
else
{
// Delayed delete
// Pointless to update item_id label here since link still exists and first notifyObservers
// call will restore (wear) suffix, mark for update after deletion
LLPointer
<
LLUpdateOnCOFLinkRemove
>
cb_label
=
new
LLUpdateOnCOFLinkRemove
(
item_id
,
cb
);
remove_inventory_item
(
item
->
getUUID
(),
cb_label
,
false
);
}
}
remove_inventory_item
(
item
->
getUUID
(),
cb
,
immediate_delete
);
}
}
}
}
}
}
...
...
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