summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryobserver.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-11-23 09:37:09 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-11-23 09:37:09 -0500
commit8f4c4db90fdafc86efb64318e611d00aae662ab1 (patch)
treeb5e051cc330d359e437ba985ffcdbe29a1f4a2a7 /indra/newview/llinventoryobserver.cpp
parent0384d579726e61b4239880df9fddb502afe65f5a (diff)
SH-4611 FIX - use an observer to scroll after category rename completes
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
-rwxr-xr-xindra/newview/llinventoryobserver.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 011686bfdd..ae59b44184 100755
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -701,3 +701,24 @@ LLInventoryCategoriesObserver::LLCategoryData::LLCategoryData(
{
mItemNameHash.finalize();
}
+
+void LLScrollOnRenameObserver::changed(U32 mask)
+{
+ if (mask & LLInventoryObserver::LABEL)
+ {
+ // TODO - check for whether this is the item we're waiting for a rename of
+ const uuid_set_t& changed_item_ids = gInventory.getChangedIDs();
+ for (uuid_set_t::const_iterator it = changed_item_ids.begin(); it != changed_item_ids.end(); ++it)
+ {
+ const LLUUID& id = *it;
+ if (id == mUUID)
+ {
+ mView->scrollToShowSelection();
+
+ gInventory.removeObserver(this);
+ delete this;
+ return;
+ }
+ }
+ }
+}