summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-08-16 08:52:26 -0400
committerOz Linden <oz@lindenlab.com>2012-08-16 08:52:26 -0400
commita7d8b425097a7fab0a5a40d6a6b5770deb0bb7f9 (patch)
tree81e800d495674faa37d66c18db36cbfccd7fc5eb /indra/newview/llinventoryfunctions.cpp
parentdf93749819c503a66bc0ad34aeb1c7bed3746df2 (diff)
parentb9e43dfd646990be236e44814ce3199de3391dc1 (diff)
merge up to latest viewer-development
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp50
1 files changed, 31 insertions, 19 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index ab5b082915..e98d3f88a6 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -440,7 +440,7 @@ void show_item_original(const LLUUID& item_uuid)
//sidetray inventory panel
LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- bool reset_inventory_filter = !floater_inventory->isInVisibleChain();
+ bool do_reset_inventory_filter = !floater_inventory->isInVisibleChain();
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel();
if (!active_panel)
@@ -460,37 +460,49 @@ void show_item_original(const LLUUID& item_uuid)
}
active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO);
- if(reset_inventory_filter)
+ if(do_reset_inventory_filter)
{
- //inventory floater
- bool floater_inventory_visible = false;
+ reset_inventory_filter();
+ }
+}
+
- 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)
+void reset_inventory_filter()
+{
+ //inventory floater
+ bool floater_inventory_visible = false;
+
+ 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* floater_inventory = dynamic_cast<LLFloaterInventory*>(*iter);
+ if (floater_inventory)
{
- LLFloaterInventory* floater_inventory = dynamic_cast<LLFloaterInventory*>(*iter);
- if (floater_inventory)
- {
- LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel();
+ LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel();
- main_inventory->onFilterEdit("");
+ main_inventory->onFilterEdit("");
- if(floater_inventory->getVisible())
- {
- floater_inventory_visible = true;
- }
+ if(floater_inventory->getVisible())
+ {
+ floater_inventory_visible = true;
}
}
- if(sidepanel_inventory && !floater_inventory_visible)
+ }
+
+ if(!floater_inventory_visible)
+ {
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
{
LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
-
- main_inventory->onFilterEdit("");
+ if (main_inventory)
+ {
+ main_inventory->onFilterEdit("");
+ }
}
}
}
-
void open_outbox()
{
LLFloaterReg::showInstance("outbox");