summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormerov_linden <none@none>2012-07-19 03:57:24 +0100
committermerov_linden <none@none>2012-07-19 03:57:24 +0100
commit15f6f877f923ecc85489c0159ca62deb02de1201 (patch)
tree94c528c56d9ffae6f336b6f02b2daa9aaf791902 /indra
parentbe53b31fedd3b6eb559838323314e5ec1af21f0c (diff)
CHUI-236 : WIP : Modify the handling of FT_ROOT_INVENTORY which was creating havoc in LLInventoryModel instantiation. Still, some of those hack will have to come back on.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorymodel.cpp37
-rw-r--r--indra/newview/llplacesinventorypanel.cpp37
2 files changed, 20 insertions, 54 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 9b0d12b353..3250d60179 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -210,7 +210,7 @@ const LLViewerInventoryCategory *LLInventoryModel::getFirstNondefaultParent(cons
if (!cat) break;
const LLFolderType::EType folder_type = cat->getPreferredType();
if (folder_type != LLFolderType::FT_NONE &&
- folder_type != LLFolderType::FT_ROOT_INVENTORY &&
+// folder_type != LLFolderType::FT_ROOT_INVENTORY &&
!LLFolderType::lookupIsEnsembleType(folder_type))
{
return cat;
@@ -380,11 +380,12 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType prefe
LLUUID rv = LLUUID::null;
const LLUUID &root_id = (find_in_library) ? gInventory.getLibraryRootFolderID() : gInventory.getRootFolderID();
- if(LLFolderType::FT_ROOT_INVENTORY == preferred_type)
- {
- rv = root_id;
- }
- else if (root_id.notNull())
+// if(LLFolderType::FT_ROOT_INVENTORY == preferred_type)
+// {
+// rv = root_id;
+// }
+// else if (root_id.notNull())
+ if (root_id.notNull())
{
cat_array_t* cats = NULL;
cats = get_ptr_in_map(mParentChildCategoryTree, root_id);
@@ -2026,11 +2027,11 @@ void LLInventoryModel::buildParentChildMap()
{
cat->setParent(findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND));
}
- else if(LLFolderType::FT_ROOT_INVENTORY == pref)
- {
+// else if(LLFolderType::FT_ROOT_INVENTORY == pref)
+// {
// it's the root
- cat->setParent(LLUUID::null);
- }
+// cat->setParent(LLUUID::null);
+// }
else
{
// it's a protected folder.
@@ -2160,14 +2161,14 @@ void LLInventoryModel::buildParentChildMap()
if(category && category->getPreferredType() != LLFolderType::FT_ROOT_INVENTORY)
continue;
- if ( category && 0 == LLStringUtil::compareInsensitive(name, category->getName()) )
- {
- if(category->getUUID()!=mRootFolderID)
- {
- LLUUID& new_inv_root_folder_id = const_cast<LLUUID&>(mRootFolderID);
- new_inv_root_folder_id = category->getUUID();
- }
- }
+// if ( category && 0 == LLStringUtil::compareInsensitive(name, category->getName()) )
+// {
+// if(category->getUUID()!=mRootFolderID)
+// {
+// LLUUID& new_inv_root_folder_id = const_cast<LLUUID&>(mRootFolderID);
+// new_inv_root_folder_id = category->getUUID();
+// }
+// }
}
}
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index 65d9691902..c46681f556 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -60,44 +60,9 @@ LLPlacesInventoryPanel::~LLPlacesInventoryPanel()
void LLPlacesInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
{
- // Determine the root folder in case specified, and
- // build the views starting with that folder.
- const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(params.start_folder);
-
- LLUUID root_id;
-
- if ("LIBRARY" == params.start_folder())
- {
- root_id = gInventory.getLibraryRootFolderID();
- }
- else
- {
- root_id = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
- }
-
- LLRect folder_rect(0,
- 0,
- getRect().getWidth(),
- 0);
- LLPlacesFolderView::Params p;
- p.name = getName();
- p.title = getLabel();
- p.rect = folder_rect;
- p.listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY,
- LLAssetType::AT_CATEGORY,
- LLInventoryType::IT_CATEGORY,
- this,
- &mInventoryViewModel,
- NULL,
- root_id);
- p.parent_panel = this;
- p.allow_multiselect = mAllowMultiSelect;
- p.use_ellipses = true; // truncate inventory item text so remove horizontal scroller
- p.view_model = &mInventoryViewModel;
- mFolderRoot = LLUICtrlFactory::create<LLPlacesFolderView>(p);
+ LLInventoryPanel::buildFolderView(params);
}
-
// save current folder open state
void LLPlacesInventoryPanel::saveFolderState()
{