diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-10-11 20:56:25 +0200 |
---|---|---|
committer | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-10-11 21:22:30 +0200 |
commit | b134e91d2a2e7ff97e6f906d6ef36177e1dddeab (patch) | |
tree | a92013d83c4cf342569f73c60ffbe1610b3dddc8 /indra/newview/llviewermessage.cpp | |
parent | 3e4fd9a20cb681da67952dcd49c3e12e6017832b (diff) |
SL-20419 Receiving new objects or items, etc causes inventory to switch from recent to my inventory tab
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f3288a5300..1b3c426067 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1557,15 +1557,22 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam } else { - // Highlight item - const BOOL auto_open = - gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false - !from_name.empty(); // don't open if it's not from anyone. - if(auto_open) + // Highlight item + bool show_in_inventory = gSavedSettings.get<bool>("ShowInInventory"); + bool auto_open = + show_in_inventory && // don't open if ShowInInventory is FALSE + !from_name.empty(); // don't open if it's not from anyone + + // SL-20419 : Don't change active tab if floater is visible + LLFloater* instance = LLFloaterReg::findInstance("inventory"); + bool use_main_panel = instance && instance->getVisible(); + + if (auto_open) { LLFloaterReg::showInstance("inventory"); } - LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true); + + LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, use_main_panel); } } } |