summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp38
1 files changed, 13 insertions, 25 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index d06374d232..382569fa3a 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -132,6 +132,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mAcceptsDragAndDrop(p.accepts_drag_and_drop),
mAllowMultiSelect(p.allow_multi_select),
mShowItemLinkOverlays(p.show_item_link_overlays),
+ mShowEmptyMessage(p.show_empty_message),
mShowLoadStatus(p.show_load_status),
mViewsInitialized(false),
mInvFVBridgeBuilder(NULL)
@@ -617,6 +618,7 @@ LLFolderView * LLInventoryPanel::createFolderView(LLInvFVBridge * bridge, bool u
p.listener = bridge;
p.use_label_suffix = useLabelSuffix;
p.allow_multiselect = mAllowMultiSelect;
+ p.show_empty_message = mShowEmptyMessage;
p.show_load_status = mShowLoadStatus;
return LLUICtrlFactory::create<LLFolderView>(p);
@@ -1105,30 +1107,23 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
return FALSE;
}
- LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
-
- // A. If the inventory side panel floater is open, use that preferably.
- if (is_inventorysp_active())
- {
- // Get the floater's z order to compare it to other inventory floaters' order later.
- res = sidepanel_inventory->getActivePanel();
- z_min = gFloaterView->getZOrder(floater_inventory);
- active_inv_floaterp = floater_inventory;
- }
+ LLSidepanelInventory *inventory_panel = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- // B. Iterate through the inventory floaters and return whichever is on top.
+ // Iterate through the inventory floaters and return whichever is on top.
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)
{
- LLFloaterInventory* iv = dynamic_cast<LLFloaterInventory*>(*iter);
- if (iv && iv->getVisible())
+ LLFloaterSidePanelContainer* inventory_floater = dynamic_cast<LLFloaterSidePanelContainer*>(*iter);
+ inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
+
+ if (inventory_floater && inventory_panel && inventory_floater->getVisible())
{
- S32 z_order = gFloaterView->getZOrder(iv);
+ S32 z_order = gFloaterView->getZOrder(inventory_floater);
if (z_order < z_min)
{
- res = iv->getPanel();
+ res = inventory_panel->getActivePanel();
z_min = z_order;
- active_inv_floaterp = iv;
+ active_inv_floaterp = inventory_floater;
}
}
}
@@ -1145,7 +1140,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
{
floater_inventory->openFloater();
- res = sidepanel_inventory->getActivePanel();
+ res = inventory_panel->getActivePanel();
}
return res;
@@ -1164,7 +1159,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
LLViewerInventoryCategory * cat = gInventory.getCategory(obj_id);
bool in_inbox = false;
- bool in_outbox = false;
LLViewerInventoryCategory * parent_cat = NULL;
@@ -1180,10 +1174,9 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
if (parent_cat)
{
in_inbox = (LLFolderType::FT_INBOX == parent_cat->getPreferredType());
- in_outbox = (LLFolderType::FT_OUTBOX == parent_cat->getPreferredType());
}
- if (in_inbox || in_outbox)
+ if (in_inbox)
{
LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
LLInventoryPanel * inventory_panel = NULL;
@@ -1193,11 +1186,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
sidepanel_inventory->openInbox();
inventory_panel = sidepanel_inventory->getInboxPanel();
}
- else
- {
- sidepanel_inventory->openOutbox();
- inventory_panel = sidepanel_inventory->getOutboxPanel();
- }
if (inventory_panel)
{