diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-07 11:43:24 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-07 11:43:24 -0500 |
commit | 13f1ed2740664332d52b15094438aed3e3accc0e (patch) | |
tree | de32fcbb0d3486f505e778c49953bdf0a4685a33 /indra | |
parent | 23068a2e7d9086a212d8c1eb4318c762705ab31e (diff) |
EXT-3124 : Add lookup for finding all linked items to an item
EXT-3195 : Regenerat Links sometimes pairs to library items
Excluding library when repairing broken links.
Reselecting original selected broken link after repairing.
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 23 |
2 files changed, 5 insertions, 24 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 92b4c8383e..44d32cdc99 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -968,14 +968,16 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } if (command_name == "regenerate_link") { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + LLInventoryPanel *active_panel = getActivePanel(); + LLFolderViewItem* current_item = active_panel->getRootFolder()->getCurSelectedItem(); if (!current_item) { return; } - const LLUUID& item_id = current_item->getListener()->getUUID(); + const LLUUID item_id = current_item->getListener()->getUUID(); LLViewerInventoryItem *item = gInventory.getItem(item_id); item->regenerateLink(); + active_panel->setSelection(item_id, TAKE_FOCUS_NO); } if (command_name == "find_original") { diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index f20d87a687..3019d714fd 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1464,30 +1464,9 @@ LLUUID find_possible_item_for_regeneration(const LLViewerInventoryItem *target_i { LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; - /* - LLAssetIDMatches asset_id_matches(target_item->getAssetUUID()); - gInventory.collectDescendentsIf(LLUUID::null, - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - asset_id_matches); - for (LLViewerInventoryItem::item_array_t::const_iterator item_iter = items.begin(); - item_iter != items.end(); - item_iter++) - { - const LLViewerInventoryItem *item = (*item_iter); - if (!item->getIsBrokenLink()) - { - return item->getAssetUUID(); - } - } - */ - - items.clear(); - cats.clear(); LLRegenerateLinkCollector candidate_matches(target_item); - gInventory.collectDescendentsIf(LLUUID::null, + gInventory.collectDescendentsIf(gInventory.getRootFolderID(), cats, items, LLInventoryModel::EXCLUDE_TRASH, |