summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-04 15:14:02 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-04 15:14:02 +0300
commit7ccfbd7c285cc2ab0bbf569912f8e9e2d5c1df72 (patch)
tree1102d1b3ccb455e4500661fa3e420dd3189c5608 /indra/newview/llinventorypanel.cpp
parent77753a31aba6123696761aeeb2c535768fd1ea12 (diff)
SL-19379 Don't switch focus to other Inventory floater when creating an item in Gallery
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 392624a7e8..f97f07f52c 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1793,6 +1793,20 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
{
sidepanel_inventory->selectAllItemsPanel();
}
+
+ LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater();
+ if(!auto_open && inventory_floater && inventory_floater->getVisible())
+ {
+ LLSidepanelInventory *inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
+ LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel();
+ if(main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode())
+ {
+ main_panel->setGallerySelection(obj_id);
+ return;
+ }
+ }
+
+
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
if (active_panel)