diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-08-08 14:37:36 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-08-08 14:37:36 -0700 |
commit | f5886bfaff0385acf0a55bc1b8678330ae89442a (patch) | |
tree | f2e9d57bc3f6c50c5d23196dad9a4605332d7066 | |
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.
disable traversal of inventory contents for findView family of functions
-rw-r--r-- | indra/newview/llfolderview.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llfolderview.h | 1 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.h | 2 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 4 |
4 files changed, 5 insertions, 14 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 7581fa91c5..02be477e0d 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -369,16 +369,6 @@ void LLFolderView::closeAllFolders() arrangeAll(); } -void LLFolderView::openFolder(const std::string& foldername) -{ - LLFolderViewFolder* inv = findChild<LLFolderViewFolder>(foldername); - if (inv) - { - setSelection(inv, FALSE, FALSE); - inv->setOpen(TRUE); - } -} - void LLFolderView::openTopLevelFolders() { for (folders_t::iterator iter = mFolders.begin(); @@ -720,8 +710,10 @@ void LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem mSignalSelectCallback = SIGNAL_KEYBOARD_FOCUS; } +static LLFastTimer::DeclareTimer FTM_SANITIZE_SELECTION("Sanitize Selection"); void LLFolderView::sanitizeSelection() { + LLFastTimer _(FTM_SANITIZE_SELECTION); // store off current item in case it is automatically deselected // and we want to preserve context LLFolderViewItem* original_selected_item = getCurSelectedItem(); diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 0b92548fd0..705a76a7b4 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -108,7 +108,6 @@ public: // Close all folders in the view void closeAllFolders(); - void openFolder(const std::string& foldername); void openTopLevelFolders(); virtual void toggleOpen() {}; diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index f70e63ecdf..dac0c3032c 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -328,6 +328,8 @@ public: virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ); virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); + virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return NULL; } + // virtual void handleDropped(); virtual void draw(); virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index d5d40ca65d..1aa402802e 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -812,9 +812,7 @@ void LLInventoryPanel::openStartFolderOrMyInventory() && fchild->getListener() && fchild->getListener()->getUUID() == gInventory.getRootFolderID()) { - const std::string& child_name = child->getName(); - mFolderRoot->openFolder(child_name); - mFolderRoot->clearSelection(); // No need to keep it selected though! + fchild->setOpen(TRUE); break; } } |