summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-10-11 20:56:25 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2023-10-11 21:19:40 +0200
commit136a993ef2fad587cb61d5aa2b142ac9119d2e42 (patch)
treee6fcec7067687bfd29f9da646a74185991c0a81a /indra/newview/llviewermessage.cpp
parent1f00b2e04857bf118e7217e1310c38d08738f657 (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.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index bca7fbac33..17b56c9d1d 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);
}
}
}