diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-12-10 17:43:21 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-12-10 17:43:21 +0200 |
commit | 6ec194154be3d40f897d728925d1a565c6f8be78 (patch) | |
tree | b133de64bcfa8a7bc44497e33300277f78fac4a5 /indra/newview/llinventorybridge.cpp | |
parent | d1789103c2a4307dd24280d61a83819e817da819 (diff) |
SL-13826 Show result of "Find original" and "Show original" in Main Inventory floater and reset the filters to guarantee success
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ae96963b2a..27e222237e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1863,29 +1863,11 @@ void LLItemBridge::restoreToWorld() void LLItemBridge::gotoItem() { - LLInventoryObject *obj = getInventoryObject(); - if (obj && obj->getIsLinkType()) - { - const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); - if (gInventory.isObjectDescendentOf(obj->getLinkedUUID(), inbox_id)) - { - LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); - if (sidepanel_inventory && sidepanel_inventory->getInboxPanel()) - { - sidepanel_inventory->getInboxPanel()->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO); - } - } - else - { - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); - if (active_panel) - { - active_panel->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO); - active_panel->setFocus(TRUE); - } - } - - } + LLInventoryObject *obj = getInventoryObject(); + if (obj && obj->getIsLinkType()) + { + show_item_original(obj->getUUID()); + } } LLUIImagePtr LLItemBridge::getIcon() const @@ -7251,13 +7233,20 @@ void LLLinkFolderBridge::performAction(LLInventoryModel* model, std::string acti } LLItemBridge::performAction(model,action); } - void LLLinkFolderBridge::gotoItem() { LLItemBridge::gotoItem(); - LLInventoryPanel::getActiveInventoryPanel()->openFolderByID(getFolderID()); -} + const LLUUID &cat_uuid = getFolderID(); + if (!cat_uuid.isNull()) + { + LLFolderViewItem *base_folder = LLInventoryPanel::getActiveInventoryPanel()->getItemByID(cat_uuid); + if (base_folder) + { + base_folder->setOpen(TRUE); + } + } +} const LLUUID &LLLinkFolderBridge::getFolderID() const { if (LLViewerInventoryItem *link_item = getItem()) |