diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-08-08 15:13:53 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-08-08 15:13:53 -0700 |
commit | b6685b5872a4afe976f39d201868b8d656044e84 (patch) | |
tree | 91b138a276cc51078f57ce4f0b059a63fa2230c2 /indra/newview/llpanelmaininventory.cpp | |
parent | d712dde69e29381ab1bf55f27c41bb3b29ef3b59 (diff) |
EXP-1065 FIX -- Inventory has slowed to a crawl. Clicking between items has an average one second delay. Same with switching between tabs.
* Removed numerous places in the code that called findChild across the inventory panel unnecessarily.
* Conglomerated uses of inbox and outbox inventory panels to the sidepanel class so the pointers can be cached and functionality like selection handling can be done more efficiently.
* Optimized LLView::childHasKeyboardFocus() to work backwards up from the focus object rather than searching for children that may or may not turn out to have focus.
Reviewed by Richard.
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 1920cc2940..858f5cf575 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -572,28 +572,16 @@ void LLPanelMainInventory::updateItemcountText() { text = getString("ItemcountUnknown"); } + + // *TODO: Cache the LLUICtrl* for the ItemcountText control getChild<LLUICtrl>("ItemcountText")->setValue(text); } void LLPanelMainInventory::onFocusReceived() { LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory"); - - LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox"); - - if (inbox_panel) - { - inbox_panel->clearSelection(); - } - - LLInventoryPanel * outbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_outbox"); - - if (outbox_panel) - { - outbox_panel->clearSelection(); - } - - sidepanel_inventory->updateVerbs(); + + sidepanel_inventory->clearSelections(false, true, true); } void LLPanelMainInventory::setFilterTextFromFilter() |