diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-02 18:31:01 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-02 18:31:01 -0500 |
commit | 9841edf0f4b82744ac7790e6c4887e50ce389ecf (patch) | |
tree | c2556212ab9f1fca6f331ea49036e6234e2134b2 /indra/newview/llinventorypanel.cpp | |
parent | 4b5849b6c07939abd4840ebf327279da6651dd78 (diff) |
EXT-3060 : Turn links into broken links immediately when baseobj is purged
EXT-3067 : INFRASTRUCTURE : LLInventoryPanel::modelChanged cleanup
Added REBUILD mask to inventory observer.
Added new logic for rebuilding linked items when an item is purged.
Took out atrocious expensive refresh that was being triggered on most LLInventoryPanel::modelChanged.
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 02d0217321..88e7196ce6 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -293,6 +293,30 @@ void LLInventoryPanel::modelChanged(U32 mask) view_item->refresh(); } } + + ////////////////////////////// + // REBUILD Operation + // Destroy and regenerate the UI. + if (mask & LLInventoryObserver::REBUILD) + { + handled = true; + if (model_item && view_item) + { + view_item->destroyView(); + } + buildNewViews(item_id); + } + + ////////////////////////////// + // INTERNAL Operation + // This could be anything. For now, just refresh the item. + if (mask & LLInventoryObserver::INTERNAL) + { + if (view_item) + { + view_item->refresh(); + } + } // We don't typically care which of these masks the item is actually flagged with, since the masks // may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into @@ -359,6 +383,7 @@ void LLInventoryPanel::modelChanged(U32 mask) } } + /* I don't think we need this code, but not positive -- Seraph if (!handled) { // It's a small change that only requires a refresh. @@ -366,6 +391,7 @@ void LLInventoryPanel::modelChanged(U32 mask) // since it is expensive on large inventories mFolders->refresh(); } + */ } // static |