aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventoryview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llinventoryview.cpp')
-rw-r--r--linden/indra/newview/llinventoryview.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index a318f5d..0f1eb2b 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$ 5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2001-2008, Linden Research, Inc. 7 * Copyright (c) 2001-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -1657,6 +1657,16 @@ LLView* LLInventoryPanel::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
1657 return panel; 1657 return panel;
1658} 1658}
1659 1659
1660void LLInventoryPanel::draw()
1661{
1662 // select the desired item (in case it wasn't loaded when the selection was requested)
1663 if (mSelectThisID.notNull())
1664 {
1665 setSelection(mSelectThisID, false);
1666 }
1667 LLPanel::draw();
1668}
1669
1660void LLInventoryPanel::setFilterTypes(U32 filter_types) 1670void LLInventoryPanel::setFilterTypes(U32 filter_types)
1661{ 1671{
1662 mFolders->getFilter()->setFilterTypes(filter_types); 1672 mFolders->getFilter()->setFilterTypes(filter_types);
@@ -2034,15 +2044,21 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc
2034 LLFolderViewItem* itemp = mFolders->getItemByID(obj_id); 2044 LLFolderViewItem* itemp = mFolders->getItemByID(obj_id);
2035 if(itemp && itemp->getListener()) 2045 if(itemp && itemp->getListener())
2036 { 2046 {
2037 itemp->getListener()->arrangeAndSet(itemp, 2047 itemp->getListener()->arrangeAndSet(itemp, TRUE, take_keyboard_focus);
2038 TRUE, 2048 mSelectThisID.setNull();
2039 take_keyboard_focus); 2049 return;
2050 }
2051 else
2052 {
2053 // save the desired item to be selected later (if/when ready)
2054 mSelectThisID = obj_id;
2040 } 2055 }
2041} 2056}
2042 2057
2043void LLInventoryPanel::clearSelection() 2058void LLInventoryPanel::clearSelection()
2044{ 2059{
2045 mFolders->clearSelection(); 2060 mFolders->clearSelection();
2061 mSelectThisID.setNull();
2046} 2062}
2047 2063
2048void LLInventoryPanel::createNewItem(const std::string& name, 2064void LLInventoryPanel::createNewItem(const std::string& name,