diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-07 21:56:32 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-07 21:56:32 +0300 |
| commit | c5979e11b6b18e893cc96b31498eb7a3a30e3780 (patch) | |
| tree | 8ca5560dc462bbeba7290585e7f7a96515c28cae /indra/newview/llinventorypanel.cpp | |
| parent | 662370ddea5ad24af00b151ef9e42f19232f9260 (diff) | |
SL-19686 Fix selection callback
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
| -rw-r--r-- | indra/newview/llinventorypanel.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index c29638ee78..3b8aa3f296 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -305,6 +305,11 @@ void LLInventoryPanel::initFolderRoot() mFolderRoot.get()->setFollowsAll(); mFolderRoot.get()->addChild(mFolderRoot.get()->mStatusTextBox); + if (mSelectionCallback) + { + mFolderRoot.get()->setSelectCallback(mSelectionCallback); + } + // Set up the callbacks from the inventory we're viewing, and then build everything. mInventoryObserver = new LLInventoryPanelObserver(this); mInventory->addObserver(mInventoryObserver); @@ -1433,6 +1438,7 @@ void LLInventoryPanel::setSelectCallback(const boost::function<void (const std:: { mFolderRoot.get()->setSelectCallback(cb); } + mSelectionCallback = cb; } void LLInventoryPanel::clearSelection() @@ -2135,15 +2141,6 @@ LLInventorySingleFolderPanel::~LLInventorySingleFolderPanel() { } -void LLInventorySingleFolderPanel::setSelectCallback(const boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb) -{ - if (mFolderRoot.get()) - { - mFolderRoot.get()->setSelectCallback(cb); - mSelectionCallback = cb; - } -} - void LLInventorySingleFolderPanel::initFromParams(const Params& p) { mFolderID = gInventory.getRootFolderID(); |
