summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelmaininventory.cpp6
-rw-r--r--indra/newview/llviewerinventory.cpp23
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,