diff options
| -rw-r--r-- | indra/newview/llinventorybridge.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llinventorypanel.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llinventorypanel.h | 2 | 
3 files changed, 20 insertions, 10 deletions
| diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d70221b22a..4c868baa92 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2614,6 +2614,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)  			{  				mItems.push_back(std::string("Rename"));  				mItems.push_back(std::string("Delete")); + +				// EXT-4030: disallow deletion of currently worn outfit +				const LLViewerInventoryItem *base_outfit_link = LLAppearanceManager::instance().getBaseOutfitLink(); +				if (base_outfit_link && (cat == base_outfit_link->getLinkedCategory())) +				{ +					mDisabledItems.push_back(std::string("Delete")); +				}  			}  		} diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 164e72e621..b363e917d7 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -433,11 +433,10 @@ void LLInventoryPanel::initializeViews()  	{  		mStartFolderID = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);  	} -	llinfos << this << " Generating views for start folder " << mStartFolderString << llendl;  	rebuildViewsFor(mStartFolderID);  	mViewsInitialized = true; -	defaultOpenInventory(); +	openStartFolderOrMyInventory();  }  void LLInventoryPanel::rebuildViewsFor(const LLUUID& id) @@ -575,7 +574,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)  }  // bit of a hack to make sure the inventory is open. -void LLInventoryPanel::defaultOpenInventory() +void LLInventoryPanel::openStartFolderOrMyInventory()  {  	if (mStartFolderString != "")  	{ @@ -583,13 +582,17 @@ void LLInventoryPanel::defaultOpenInventory()  	}  	else  	{ -		// Get the first child (it should be "My Inventory") and -		// open it up by name (just to make sure the first child is actually a folder). -		LLView* first_child = mFolders->getFirstChild(); -		if (first_child) +		// Find My Inventory folder and open it up by name +		for (LLView *child = mFolders->getFirstChild(); child; child = mFolders->findNextSibling(child))  		{ -			const std::string& first_child_name = first_child->getName(); -			mFolders->openFolder(first_child_name); +			LLFolderViewFolder *fchild = dynamic_cast<LLFolderViewFolder*>(child); +			if (fchild && fchild->getListener() && +				(fchild->getListener()->getUUID() == gInventory.getRootFolderID())) +			{ +				const std::string& child_name = child->getName(); +				mFolders->openFolder(child_name); +				break; +			}  		}  	}  } diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 4f7f0a79f6..09533b52f1 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -167,7 +167,7 @@ public:  	static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE);  protected: -	void defaultOpenInventory(); // open the first level of inventory +	void openStartFolderOrMyInventory(); // open the first level of inventory  	LLInventoryModel*			mInventory;  	LLInventoryObserver*		mInventoryObserver; | 
