diff options
Diffstat (limited to 'linden/indra/newview/llinventoryview.cpp')
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index f9dd70d..418578e 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -1329,6 +1329,16 @@ LLView* LLInventoryPanel::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac | |||
1329 | return panel; | 1329 | return panel; |
1330 | } | 1330 | } |
1331 | 1331 | ||
1332 | void LLInventoryPanel::draw() | ||
1333 | { | ||
1334 | // select the desired item (in case it wasn't loaded when the selection was requested) | ||
1335 | if (mSelectThisID.notNull()) | ||
1336 | { | ||
1337 | setSelection(mSelectThisID, false); | ||
1338 | } | ||
1339 | LLPanel::draw(); | ||
1340 | } | ||
1341 | |||
1332 | void LLInventoryPanel::setFilterTypes(U32 filter_types) | 1342 | void LLInventoryPanel::setFilterTypes(U32 filter_types) |
1333 | { | 1343 | { |
1334 | mFolders->getFilter()->setFilterTypes(filter_types); | 1344 | mFolders->getFilter()->setFilterTypes(filter_types); |
@@ -1701,15 +1711,21 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc | |||
1701 | LLFolderViewItem* itemp = mFolders->getItemByID(obj_id); | 1711 | LLFolderViewItem* itemp = mFolders->getItemByID(obj_id); |
1702 | if(itemp && itemp->getListener()) | 1712 | if(itemp && itemp->getListener()) |
1703 | { | 1713 | { |
1704 | itemp->getListener()->arrangeAndSet(itemp, | 1714 | itemp->getListener()->arrangeAndSet(itemp, TRUE, take_keyboard_focus); |
1705 | TRUE, | 1715 | mSelectThisID.setNull(); |
1706 | take_keyboard_focus); | 1716 | return; |
1717 | } | ||
1718 | else | ||
1719 | { | ||
1720 | // save the desired item to be selected later (if/when ready) | ||
1721 | mSelectThisID = obj_id; | ||
1707 | } | 1722 | } |
1708 | } | 1723 | } |
1709 | 1724 | ||
1710 | void LLInventoryPanel::clearSelection() | 1725 | void LLInventoryPanel::clearSelection() |
1711 | { | 1726 | { |
1712 | mFolders->clearSelection(); | 1727 | mFolders->clearSelection(); |
1728 | mSelectThisID.setNull(); | ||
1713 | } | 1729 | } |
1714 | 1730 | ||
1715 | void LLInventoryPanel::createNewItem(const std::string& name, | 1731 | void LLInventoryPanel::createNewItem(const std::string& name, |