diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-17 10:36:11 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-17 10:36:11 -0500 |
commit | 32dccaf3d89b40b711d69088a3e390119c7efc7f (patch) | |
tree | 4bc6870bcf560fabffd9f3a1b3e7da862e3799e8 /indra/newview/llinventorypanel.cpp | |
parent | b88778ca7d2de5b381eb59722d9075c8e02ccb39 (diff) |
Sidepanel Appearance refactoring. Work in progress.
1. Changed sidepanel names to have "sidepanel" (e.g. panel_appearance -> sidepanel_appearance)
2. Changed some "Looks" names to "Outfits"
3. Changed LLPanelLooks to LLPanelOutfitsInventory (to match other inventory panel naming)
4. Took out tab from sidepanel_appearance.
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 7b7090d10d..450ce92412 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -145,23 +145,10 @@ BOOL LLInventoryPanel::postBuild() mInventoryObserver = new LLInventoryPanelObserver(this);
mInventory->addObserver(mInventoryObserver);
- // determine the root folder, if any, so inventory contents show just the children
- // of that folder (i.e. not including the folder itself).
- const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(mStartFolderString);
-
- if ("LIBRARY" == mStartFolderString)
- {
- mStartFolderID = gInventory.getLibraryRootFolderID();
- }
- else
- {
- mStartFolderID = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
- }
-
// build view of inventory if we need default full hierarchy and inventory ready, otherwise wait for modelChanged() callback
if (mBuildDefaultHierarchy && mInventory->isInventoryUsable() && !mHasInventoryConnection)
{
- rebuildViewsFor(mStartFolderID);
+ rebuildViews();
mHasInventoryConnection = true;
defaultOpenInventory();
}
@@ -268,7 +255,7 @@ void LLInventoryPanel::modelChanged(U32 mask) // inventory just initialized, do complete build
if ((mask & LLInventoryObserver::ADD) && gInventory.getChangedIDs().empty() && !mHasInventoryConnection)
{
- rebuildViewsFor(mStartFolderID);
+ rebuildViews();
mHasInventoryConnection = true;
defaultOpenInventory();
return;
@@ -388,6 +375,24 @@ void LLInventoryPanel::modelChanged(U32 mask) }
+void LLInventoryPanel::rebuildViews()
+{
+ // Determine the root folder and rebuild the views starting
+ // at that folder.
+ const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(mStartFolderString);
+
+ if ("LIBRARY" == mStartFolderString)
+ {
+ mStartFolderID = gInventory.getLibraryRootFolderID();
+ }
+ else
+ {
+ mStartFolderID = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
+ }
+
+ rebuildViewsFor(mStartFolderID);
+}
+
void LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
{
LLFolderViewItem* old_view = NULL;
|