summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-02-24 03:05:30 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-02-24 03:17:53 +0200
commit49da5288bd0425241823186bfd56a159fe2f9a60 (patch)
treeda412dafd1c9be961f254f825737b9e026706c6b /indra/newview/llinventoryfunctions.cpp
parenta2c61cfe35cfe3edb6fcedc09e9529c9a2940ed0 (diff)
SL-19234 add Inventory settings floater
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 5e5be39c0c..15916ffaba 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -781,7 +781,22 @@ void show_item_profile(const LLUUID& item_uuid)
void show_item_original(const LLUUID& item_uuid)
{
- LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
+ static LLUICachedControl<bool> find_original_new_floater("FindOriginalOpenWindow", false);
+
+ //show in a new single-folder window
+ if(find_original_new_floater)
+ {
+ const LLUUID& linked_item_uuid = gInventory.getLinkedItemID(item_uuid);
+ const LLInventoryObject *obj = gInventory.getObject(linked_item_uuid);
+ if (obj && obj->getParentUUID().notNull())
+ {
+ LLPanelMainInventory::newFolderWindow(obj->getParentUUID(), linked_item_uuid);
+ }
+ }
+ //show in main Inventory
+ else
+ {
+ LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
if (!floater_inventory)
{
LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL;
@@ -793,6 +808,10 @@ void show_item_original(const LLUUID& item_uuid)
LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
if (main_inventory)
{
+ if(main_inventory->isSingleFolderMode())
+ {
+ main_inventory->onViewModeClick();
+ }
main_inventory->resetFilters();
}
reset_inventory_filter();
@@ -820,6 +839,7 @@ void show_item_original(const LLUUID& item_uuid)
}
}
}
+ }
}