summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersidepanelcontainer.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-10-04 07:00:54 +0800
committerErik Kundiman <erik@megapahit.org>2023-10-04 07:00:54 +0800
commit5daccb743f50c7bca066d737ee18295ed38279de (patch)
treea0cd5bd3378b2fc44143658bf2677526bae4c505 /indra/newview/llfloatersidepanelcontainer.cpp
parentdcdd85e4342305bf363c76e6de1e8f8e0ea8840d (diff)
parent5d7b1b09ff195611548bababf36d412ef76ed924 (diff)
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/newview/llfloatersidepanelcontainer.cpp')
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index dd7ce40e97..a875d33679 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -90,6 +90,29 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
}
}
+LLFloater* LLFloaterSidePanelContainer::getTopmostInventoryFloater()
+{
+ LLFloater* topmost_floater = NULL;
+ S32 z_min = S32_MAX;
+
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ {
+ LLFloater* inventory_floater = (*iter);
+
+ if (inventory_floater && inventory_floater->getVisible())
+ {
+ S32 z_order = gFloaterView->getZOrder(inventory_floater);
+ if (z_order < z_min)
+ {
+ z_min = z_order;
+ topmost_floater = inventory_floater;
+ }
+ }
+ }
+ return topmost_floater;
+}
+
LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
{
LLView* view = findChildView(panel_name, true);