summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp36
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) &&