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
2d0b3290
Commit
2d0b3290
authored
11 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
SH-4238 WIP - postpone calling notifyObservers until all deletes are processed.
parent
56cf4297
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llaisapi.cpp
+3
-1
3 additions, 1 deletion
indra/newview/llaisapi.cpp
indra/newview/llinventorymodel.cpp
+9
-4
9 additions, 4 deletions
indra/newview/llinventorymodel.cpp
indra/newview/llinventorymodel.h
+5
-2
5 additions, 2 deletions
indra/newview/llinventorymodel.h
with
17 additions
and
7 deletions
indra/newview/llaisapi.cpp
+
3
−
1
View file @
2d0b3290
...
@@ -476,7 +476,9 @@ void AISUpdate::doUpdate()
...
@@ -476,7 +476,9 @@ void AISUpdate::doUpdate()
del_it
!=
mObjectsDeleted
.
end
();
++
del_it
)
del_it
!=
mObjectsDeleted
.
end
();
++
del_it
)
{
{
LL_DEBUGS
(
"Inventory"
)
<<
"deleted item "
<<
*
del_it
<<
llendl
;
LL_DEBUGS
(
"Inventory"
)
<<
"deleted item "
<<
*
del_it
<<
llendl
;
gInventory
.
onObjectDeletedFromServer
(
*
del_it
,
false
,
false
);
gInventory
.
onObjectDeletedFromServer
(
*
del_it
,
false
,
false
,
false
);
}
}
gInventory
.
notifyObservers
();
}
}
This diff is collapsed.
Click to expand it.
indra/newview/llinventorymodel.cpp
+
9
−
4
View file @
2d0b3290
...
@@ -1157,6 +1157,7 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat,
...
@@ -1157,6 +1157,7 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat,
void
LLInventoryModel
::
onAISUpdateReceived
(
const
std
::
string
&
context
,
const
LLSD
&
update
)
void
LLInventoryModel
::
onAISUpdateReceived
(
const
std
::
string
&
context
,
const
LLSD
&
update
)
{
{
LLTimer
timer
;
if
(
gSavedSettings
.
getBOOL
(
"DebugAvatarAppearanceMessage"
))
if
(
gSavedSettings
.
getBOOL
(
"DebugAvatarAppearanceMessage"
))
{
{
dump_sequential_xml
(
gAgentAvatarp
->
getFullname
()
+
"_ais_update"
,
update
);
dump_sequential_xml
(
gAgentAvatarp
->
getFullname
()
+
"_ais_update"
,
update
);
...
@@ -1164,6 +1165,7 @@ void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLS
...
@@ -1164,6 +1165,7 @@ void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLS
AISUpdate
ais_update
(
update
);
// parse update llsd into stuff to do.
AISUpdate
ais_update
(
update
);
// parse update llsd into stuff to do.
ais_update
.
doUpdate
();
// execute the updates in the appropriate order.
ais_update
.
doUpdate
();
// execute the updates in the appropriate order.
llinfos
<<
"elapsed: "
<<
timer
.
getElapsedTimeF32
()
<<
llendl
;
}
}
void
LLInventoryModel
::
onItemUpdated
(
const
LLUUID
&
item_id
,
const
LLSD
&
updates
,
bool
update_parent_version
)
void
LLInventoryModel
::
onItemUpdated
(
const
LLUUID
&
item_id
,
const
LLSD
&
updates
,
bool
update_parent_version
)
...
@@ -1316,7 +1318,7 @@ void LLInventoryModel::onDescendentsPurgedFromServer(const LLUUID& object_id, bo
...
@@ -1316,7 +1318,7 @@ void LLInventoryModel::onDescendentsPurgedFromServer(const LLUUID& object_id, bo
// Update model after an item is confirmed as removed from
// Update model after an item is confirmed as removed from
// server. Works for categories or items.
// server. Works for categories or items.
void
LLInventoryModel
::
onObjectDeletedFromServer
(
const
LLUUID
&
object_id
,
bool
fix_broken_links
,
bool
update_parent_version
)
void
LLInventoryModel
::
onObjectDeletedFromServer
(
const
LLUUID
&
object_id
,
bool
fix_broken_links
,
bool
update_parent_version
,
bool
do_notify_observers
)
{
{
LLPointer
<
LLInventoryObject
>
obj
=
getObject
(
object_id
);
LLPointer
<
LLInventoryObject
>
obj
=
getObject
(
object_id
);
if
(
obj
)
if
(
obj
)
...
@@ -1337,13 +1339,13 @@ void LLInventoryModel::onObjectDeletedFromServer(const LLUUID& object_id, bool f
...
@@ -1337,13 +1339,13 @@ void LLInventoryModel::onObjectDeletedFromServer(const LLUUID& object_id, bool f
// From purgeObject()
// From purgeObject()
LLPreview
::
hide
(
object_id
);
LLPreview
::
hide
(
object_id
);
deleteObject
(
object_id
,
fix_broken_links
);
deleteObject
(
object_id
,
fix_broken_links
,
do_notify_observers
);
}
}
}
}
// Delete a particular inventory object by ID.
// Delete a particular inventory object by ID.
void
LLInventoryModel
::
deleteObject
(
const
LLUUID
&
id
,
bool
fix_broken_links
)
void
LLInventoryModel
::
deleteObject
(
const
LLUUID
&
id
,
bool
fix_broken_links
,
bool
do_notify_observers
)
{
{
lldebugs
<<
"LLInventoryModel::deleteObject()"
<<
llendl
;
lldebugs
<<
"LLInventoryModel::deleteObject()"
<<
llendl
;
LLPointer
<
LLInventoryObject
>
obj
=
getObject
(
id
);
LLPointer
<
LLInventoryObject
>
obj
=
getObject
(
id
);
...
@@ -1402,7 +1404,10 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links)
...
@@ -1402,7 +1404,10 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links)
{
{
updateLinkedObjectsFromPurge
(
id
);
updateLinkedObjectsFromPurge
(
id
);
}
}
notifyObservers
();
if
(
do_notify_observers
)
{
notifyObservers
();
}
}
}
void
LLInventoryModel
::
updateLinkedObjectsFromPurge
(
const
LLUUID
&
baseobj_id
)
void
LLInventoryModel
::
updateLinkedObjectsFromPurge
(
const
LLUUID
&
baseobj_id
)
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llinventorymodel.h
+
5
−
2
View file @
2d0b3290
...
@@ -334,7 +334,10 @@ class LLInventoryModel
...
@@ -334,7 +334,10 @@ class LLInventoryModel
// Update model after an item is confirmed as removed from
// Update model after an item is confirmed as removed from
// server. Works for categories or items.
// server. Works for categories or items.
void
onObjectDeletedFromServer
(
const
LLUUID
&
item_id
,
bool
fix_broken_links
=
true
,
bool
update_parent_version
=
true
);
void
onObjectDeletedFromServer
(
const
LLUUID
&
item_id
,
bool
fix_broken_links
=
true
,
bool
update_parent_version
=
true
,
bool
do_notify_observers
=
true
);
// Update model after all descendents removed from server.
// Update model after all descendents removed from server.
void
onDescendentsPurgedFromServer
(
const
LLUUID
&
object_id
,
bool
fix_broken_links
=
true
);
void
onDescendentsPurgedFromServer
(
const
LLUUID
&
object_id
,
bool
fix_broken_links
=
true
);
...
@@ -349,7 +352,7 @@ class LLInventoryModel
...
@@ -349,7 +352,7 @@ class LLInventoryModel
// object from the internal data structures, maintaining a
// object from the internal data structures, maintaining a
// consistent internal state. No cache accounting, observer
// consistent internal state. No cache accounting, observer
// notification, or server update is performed.
// notification, or server update is performed.
void
deleteObject
(
const
LLUUID
&
id
,
bool
fix_broken_links
=
true
);
void
deleteObject
(
const
LLUUID
&
id
,
bool
fix_broken_links
=
true
,
bool
do_notify_observers
=
true
);
/// move Item item_id to Trash
/// move Item item_id to Trash
void
removeItem
(
const
LLUUID
&
item_id
);
void
removeItem
(
const
LLUUID
&
item_id
);
/// move Category category_id to Trash
/// move Category category_id to Trash
...
...
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