diff options
author | Graham Linden <graham@lindenlab.com> | 2018-09-26 21:25:11 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-09-26 21:25:11 +0100 |
commit | 2783783575a9b712eb318b450dc5e6bb17d7f7c5 (patch) | |
tree | fdec4e4cf274e2a916e22d73d11afbce5bb669c0 /indra/newview/llinventorypanel.cpp | |
parent | 6d256d679e9cea63753266420ed79efa8b70dee2 (diff) | |
parent | 58aef8beaf79dc83546a7b080014ca5030733ac8 (diff) |
Merge to 5.2.0
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 702675ad49..1481992f43 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -861,13 +861,37 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) if (!folder_view_item && parent_folder) { - if (objectp->getType() <= LLAssetType::AT_NONE || - objectp->getType() >= LLAssetType::AT_COUNT) + if (objectp->getType() <= LLAssetType::AT_NONE) + { + LL_WARNS() << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : " + << ((S32)objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID() + << LL_ENDL; + return NULL; + } + + if (objectp->getType() >= LLAssetType::AT_COUNT) { - LL_WARNS() << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : " - << ((S32) objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID() - << LL_ENDL; - return NULL; + LL_WARNS() << "LLInventoryPanel::buildNewViews called with unknown objectp->mType : " + << ((S32) objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID() + << LL_ENDL; + + LLInventoryItem* item = (LLInventoryItem*)objectp; + if (item) + { + LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_UNKNOWN, + LLAssetType::AT_UNKNOWN, + LLInventoryType::IT_UNKNOWN, + this, + &mInventoryViewModel, + mFolderRoot.get(), + item->getUUID(), + item->getFlags()); + + if (new_listener) + { + folder_view_item = createFolderViewItem(new_listener); + } + } } if ((objectp->getType() == LLAssetType::AT_CATEGORY) && |