diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-07 12:47:08 +0100 | 
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-07 12:47:08 +0100 | 
| commit | 4db872e11ea5d322c20de9ddde484cb39690c1a2 (patch) | |
| tree | 742c8d48a2a33c973f7ec0f2f20cab4e806bcb3c | |
| parent | 78e7bde7ac65821084cb13a6a58b4f049e436be1 (diff) | |
| parent | ff6eccd32db0cf57e16db8941b25a12dbb64b9fa (diff) | |
merge from PE's viewer-trunk
22 files changed, 115 insertions, 67 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index d4d161f2c9..bb43c19c2c 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -135,6 +135,7 @@ LLScrollListCtrl::Params::Params()  	search_column("search_column", 0),  	sort_column("sort_column", -1),  	sort_ascending("sort_ascending", true), +	mouse_wheel_opaque("mouse_wheel_opaque", false),  	commit_on_keyboard_movement("commit_on_keyboard_movement", true),  	heading_height("heading_height"),  	page_lines("page_lines", 0), @@ -163,6 +164,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)  :	LLUICtrl(p),  	mLineHeight(0),  	mScrollLines(0), +	mMouseWheelOpaque(p.mouse_wheel_opaque),  	mPageLines(p.page_lines),  	mMaxSelectable(0),  	mAllowKeyboardMovement(TRUE), @@ -1536,6 +1538,12 @@ BOOL LLScrollListCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)  	BOOL handled = FALSE;  	// Pretend the mouse is over the scrollbar  	handled = mScrollbar->handleScrollWheel( 0, 0, clicks ); + +	if (mMouseWheelOpaque) +	{ +		return TRUE; +	} +  	return handled;  } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 1f0ef585db..19cb7e2bfe 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -102,7 +102,8 @@ public:  	{  		// behavioral flags  		Optional<bool>	multi_select, -						commit_on_keyboard_movement; +						commit_on_keyboard_movement, +						mouse_wheel_opaque;  		// display flags  		Optional<bool>	has_border, @@ -449,6 +450,7 @@ private:  	BOOL			mCommitOnSelectionChange;  	BOOL			mSelectionChanged;  	BOOL			mNeedsScroll; +	BOOL			mMouseWheelOpaque;  	BOOL			mCanSelect;  	const BOOL		mDisplayColumnHeaders;  	BOOL			mColumnsDirty; diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index ff330f863a..c91e225fd2 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -101,6 +101,7 @@ LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)  :	LLView(p),  	mTentative(FALSE),  	mIsChrome(FALSE), +	mTabStop(FALSE),      mViewModel(viewmodel),  	mControlVariable(NULL),  	mEnabledControlVariable(NULL), diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index bbf3f4fc75..4c52fb015f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5373,17 +5373,6 @@        <key>Value</key>        <integer>0</integer>      </map> -    <key>MultipleAttachments</key> -    <map> -      <key>Comment</key> -      <string>Allow multiple objects to be attached to a single attachment point.</string> -      <key>Persist</key> -      <integer>1</integer> -      <key>Type</key> -      <string>Boolean</string> -      <key>Value</key> -      <integer>0</integer> -    </map>     <key>MuteAmbient</key>      <map>        <key>Comment</key> diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6ee5a8b279..337878cf96 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -388,7 +388,9 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32  									const std::string new_name)  {  	LLWearable* old_wearable = getWearable(type, index); -	if (old_wearable && (old_wearable->isDirty() || old_wearable->isOldVersion())) +	if(!old_wearable) return; +	bool name_changed = !new_name.empty() && (new_name != old_wearable->getName()); +	if (name_changed || old_wearable->isDirty() || old_wearable->isOldVersion())  	{  		LLUUID old_item_id = old_wearable->getItemID();  		LLWearable* new_wearable = LLWearableList::instance().createCopy(old_wearable); @@ -404,12 +406,10 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32  		if (item)  		{  			std::string item_name = item->getName(); -			bool name_changed = false; -			if (!new_name.empty() && (new_name != item->getName())) +			if (name_changed)  			{  				llinfos << "saveWearable changing name from "  << item->getName() << " to " << new_name << llendl;  				item_name = new_name; -				name_changed = true;  			}  			// Update existing inventory item  			LLPointer<LLViewerInventoryItem> template_item = @@ -1885,10 +1885,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra  		msg->nextBlockFast(_PREHASH_ObjectData );  		msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());  		msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); -		if (gSavedSettings.getBOOL("MultipleAttachments")) -			msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD ); -		else -			msg->addU8Fast(_PREHASH_AttachmentPt, 0 );	// Wear at the previous or default attachment point +		msg->addU8Fast(_PREHASH_AttachmentPt, 0 );	// Wear at the previous or default attachment point  		pack_permissions_slam(msg, item->getFlags(), item->getPermissions());  		msg->addStringFast(_PREHASH_Name, item->getName());  		msg->addStringFast(_PREHASH_Description, item->getDescription()); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 296a580106..cecb2ee6ad 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1012,7 +1012,7 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up  		addCOFItemLink(item_to_wear, do_update, cb);  		break;  	case LLAssetType::AT_OBJECT: -		rez_attachment(item_to_wear, NULL); +		rez_attachment(item_to_wear, NULL, replace);  		break;  	default: return false;;  	} diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index d3d52e20f7..49d80a0249 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -184,7 +184,6 @@ LLFolderView::LLFolderView(const Params& p)  	mSourceID(p.task_id),  	mRenameItem( NULL ),  	mNeedsScroll( FALSE ), -	mEnableScroll( true ),  	mUseLabelSuffix(p.use_label_suffix),  	mPinningSelectedItem(FALSE),  	mNeedsAutoSelect( FALSE ), @@ -562,7 +561,9 @@ void LLFolderView::addToSelectionList(LLFolderViewItem* item)  void LLFolderView::removeFromSelectionList(LLFolderViewItem* item)  { -	if (mSelectedItems.size()) +	// If items are filtered while background fetch is in progress +	// scrollbar resets to the first filtered item. See EXT-3981. +	if (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && mSelectedItems.size())  	{  		mSelectedItems.back()->setIsCurSelection(FALSE);  	} @@ -1980,7 +1981,7 @@ void LLFolderView::deleteAllChildren()  void LLFolderView::scrollToShowSelection()  { -	if (mEnableScroll && mSelectedItems.size()) +	if (mSelectedItems.size())  	{  		mNeedsScroll = TRUE;  	} diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index f1d39a41ae..a7763e8eeb 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -274,7 +274,6 @@ public:  	void dumpSelectionInformation();  	virtual S32	notify(const LLSD& info) ; -	void setEnableScroll(bool enable_scroll) { mEnableScroll = enable_scroll; }  	bool useLabelSuffix() { return mUseLabelSuffix; }  private: @@ -309,7 +308,6 @@ protected:  	LLLineEditor*					mRenamer;  	BOOL							mNeedsScroll; -	bool							mEnableScroll;  	BOOL							mPinningSelectedItem;  	LLRect							mScrollConstraintRect;  	BOOL							mNeedsAutoSelect; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 38f3521b2d..7e710ce8e1 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3936,7 +3936,7 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action)  		item = (LLViewerInventoryItem*)gInventory.getItem(object_id);  		if(item && gInventory.isObjectDescendentOf(object_id, gInventory.getRootFolderID()))  		{ -			rez_attachment(item, NULL); +			rez_attachment(item, NULL, true); // Replace if "Wear"ing.  		}  		else if(item && item->isFinished())  		{ @@ -3952,6 +3952,10 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action)  		}  		gFocusMgr.setKeyboardFocus(NULL);  	} +	else if ("wear_add" == action) +	{ +		LLAppearanceMgr::instance().wearItemOnAvatar(mUUID, true, false); // Don't replace if adding. +	}  	else if (isRemoveAction(action))  	{  		LLInventoryItem* item = gInventory.getItem(mUUID); @@ -3998,7 +4002,7 @@ std::string LLObjectBridge::getLabelSuffix() const  	}  } -void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment) +void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace)  {  	LLSD payload;  	payload["item_id"] = item->getLinkedUUID(); // Wear the base object in case this is a link. @@ -4017,9 +4021,14 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach  		}  	} +	if (!replace) +	{ +		attach_pt |= ATTACHMENT_ADD; +	} +  	payload["attachment_point"] = attach_pt; -	if (!gSavedSettings.getBOOL("MultipleAttachments") && +	if (replace &&  		(attachment && attachment->getNumObjects() > 0))  	{  		LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez); @@ -4048,8 +4057,6 @@ bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& respon  		if (itemp)  		{  			U8 attachment_pt = notification["payload"]["attachment_point"].asInteger(); -			if (gSavedSettings.getBOOL("MultipleAttachments")) -				attachment_pt |= ATTACHMENT_ADD;  			LLMessageSystem* msg = gMessageSystem;  			msg->newMessageFast(_PREHASH_RezSingleAttachmentFromInv); @@ -4106,6 +4113,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)  			{  				items.push_back(std::string("Wearable And Object Separator"));  				items.push_back(std::string("Wearable And Object Wear")); +				items.push_back(std::string("Wearable Add"));  				items.push_back(std::string("Attach To"));  				items.push_back(std::string("Attach To HUD"));  				// commented out for DEV-32347 @@ -4114,6 +4122,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)  				if (!gAgentAvatarp->canAttachMoreObjects())  				{  					disabled_items.push_back(std::string("Wearable And Object Wear")); +					disabled_items.push_back(std::string("Wearable Add"));  					disabled_items.push_back(std::string("Attach To"));  					disabled_items.push_back(std::string("Attach To HUD"));  				} diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 91055eb906..00e8b0fb08 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -594,7 +594,8 @@ public:  };  void rez_attachment(LLViewerInventoryItem* item,  -					LLViewerJointAttachment* attachment); +					LLViewerJointAttachment* attachment, +					bool replace = false);  // Move items from an in-world object's "Contents" folder to a specified  // folder in agent inventory. diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index ac92f41624..770bc02b40 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -175,6 +175,9 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)  		setSortOrder(gSavedSettings.getU32(DEFAULT_SORT_ORDER));  	}  	mFolderRoot->setSortOrder(getFilter()->getSortOrder()); + +	// Initialize base class params. +	LLPanel::initFromParams(params);  }  LLInventoryPanel::~LLInventoryPanel() @@ -706,21 +709,6 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,  	return handled;  } -// virtual -void LLInventoryPanel::onMouseEnter(S32 x, S32 y, MASK mask) -{ -	LLPanel::onMouseEnter(x, y, mask); -	// don't auto-scroll a list when cursor is over Inventory. See EXT-3981. -	mFolderRoot->setEnableScroll(false); -} - -// virtual -void LLInventoryPanel::onMouseLeave(S32 x, S32 y, MASK mask) -{ -	LLPanel::onMouseLeave(x, y, mask); -	mFolderRoot->setEnableScroll(true); -} -  void LLInventoryPanel::onFocusLost()  {  	// inventory no longer handles cut/copy/paste/delete diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index c9e317f816..4db995b0c4 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -121,10 +121,6 @@ public:  								   void* cargo_data,  								   EAcceptance* accept,  								   std::string& tooltip_msg); - -	void onMouseEnter(S32 x, S32 y, MASK mask); -	void onMouseLeave(S32 x, S32 y, MASK mask); -  	// LLUICtrl methods  	 /*virtual*/ void onFocusLost();  	 /*virtual*/ void onFocusReceived(); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 050b87bbe0..21f8485e90 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3615,7 +3615,7 @@ void LLSelectMgr::selectionSetObjectSaleInfo(const LLSaleInfo& sale_info)  // Attachments  //---------------------------------------------------------------------- -void LLSelectMgr::sendAttach(U8 attachment_point) +void LLSelectMgr::sendAttach(U8 attachment_point, bool replace)  {  	LLViewerObject* attach_object = mSelectedObjects->getFirstRootObject(); @@ -3629,9 +3629,12 @@ void LLSelectMgr::sendAttach(U8 attachment_point)  	if (0 == attachment_point ||  		get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL))  	{ - -		if (gSavedSettings.getBOOL("MultipleAttachments")) +		if (!replace || attachment_point != 0) +		{ +			// If we know the attachment point then we got here by clicking an +			// "Attach to..." context menu item, so we should add, not replace.  			attachment_point |= ATTACHMENT_ADD; +		}  		sendListToRegions(  			"ObjectAttach", diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 668c04cf15..4c64c77b83 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -612,7 +612,7 @@ public:  	// verification only, if it doesn't match region info then sale is  	// canceled  	void sendBuy(const LLUUID& buyer_id, const LLUUID& category_id, const LLSaleInfo sale_info); -	void sendAttach(U8 attachment_point); +	void sendAttach(U8 attachment_point, bool replace);  	void sendDetach();  	void sendDropAttachment();  	void sendLink(); diff --git a/indra/newview/llviewerattachmenu.cpp b/indra/newview/llviewerattachmenu.cpp index f683bd8674..5b3c4ea773 100644 --- a/indra/newview/llviewerattachmenu.cpp +++ b/indra/newview/llviewerattachmenu.cpp @@ -122,7 +122,7 @@ void LLViewerAttachMenu::attachObjects(const uuid_vec_t& items, const std::strin  		LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getLinkedItem(id);  		if(item && gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID()))  		{ -			rez_attachment(item, attachmentp); +			rez_attachment(item, attachmentp); // don't replace if called from an "Attach To..." menu  		}  		else if(item && item->isFinished())  		{ diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a83980dc23..92195f0a4d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5852,6 +5852,7 @@ void handle_buy_land()  class LLObjectAttachToAvatar : public view_listener_t  {  public: +	LLObjectAttachToAvatar(bool replace) : mReplace(replace) {}  	static void setObjectSelection(LLObjectSelectionHandle selection) { sObjectSelection = selection; }  private: @@ -5865,22 +5866,38 @@ private:  			LLViewerJointAttachment* attachment_point = NULL;  			if (index > 0)  				attachment_point = get_if_there(gAgentAvatarp->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); -			confirm_replace_attachment(0, attachment_point); +			confirmReplaceAttachment(0, attachment_point);  		}  		return true;  	} +	static void onNearAttachObject(BOOL success, void *user_data); +	void confirmReplaceAttachment(S32 option, LLViewerJointAttachment* attachment_point); + +	struct CallbackData +	{ +		CallbackData(LLViewerJointAttachment* point, bool replace) : mAttachmentPoint(point), mReplace(replace) {} + +		LLViewerJointAttachment*	mAttachmentPoint; +		bool						mReplace; +	}; +  protected:  	static LLObjectSelectionHandle sObjectSelection; +	bool mReplace;  };  LLObjectSelectionHandle LLObjectAttachToAvatar::sObjectSelection; -void near_attach_object(BOOL success, void *user_data) +// static +void LLObjectAttachToAvatar::onNearAttachObject(BOOL success, void *user_data)  { +	if (!user_data) return; +	CallbackData* cb_data = static_cast<CallbackData*>(user_data); +  	if (success)  	{ -		const LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; +		const LLViewerJointAttachment *attachment = cb_data->mAttachmentPoint;  		U8 attachment_id = 0;  		if (attachment) @@ -5900,12 +5917,15 @@ void near_attach_object(BOOL success, void *user_data)  			// interpret 0 as "default location"  			attachment_id = 0;  		} -		LLSelectMgr::getInstance()->sendAttach(attachment_id); +		LLSelectMgr::getInstance()->sendAttach(attachment_id, cb_data->mReplace);  	}		  	LLObjectAttachToAvatar::setObjectSelection(NULL); + +	delete cb_data;  } -void confirm_replace_attachment(S32 option, void* user_data) +// static +void LLObjectAttachToAvatar::confirmReplaceAttachment(S32 option, LLViewerJointAttachment* attachment_point)  {  	if (option == 0/*YES*/)  	{ @@ -5930,7 +5950,8 @@ void confirm_replace_attachment(S32 option, void* user_data)  			delta = delta * 0.5f;  			walkToSpot -= delta; -			gAgent.startAutoPilotGlobal(gAgent.getPosGlobalFromAgent(walkToSpot), "Attach", NULL, near_attach_object, user_data, stop_distance); +			CallbackData* user_data = new CallbackData(attachment_point, mReplace); // *TODO: leak if the callback isn't called? +			gAgent.startAutoPilotGlobal(gAgent.getPosGlobalFromAgent(walkToSpot), "Attach", NULL, onNearAttachObject, user_data, stop_distance);  			gAgentCamera.clearFocusObject();  		}  	} @@ -8115,7 +8136,8 @@ void initialize_menus()  	commit.add("Object.Touch", boost::bind(&handle_object_touch));  	commit.add("Object.SitOrStand", boost::bind(&handle_object_sit_or_stand));  	commit.add("Object.Delete", boost::bind(&handle_object_delete)); -	view_listener_t::addMenu(new LLObjectAttachToAvatar(), "Object.AttachToAvatar"); +	view_listener_t::addMenu(new LLObjectAttachToAvatar(true), "Object.AttachToAvatar"); +	view_listener_t::addMenu(new LLObjectAttachToAvatar(false), "Object.AttachAddToAvatar");  	view_listener_t::addMenu(new LLObjectReturn(), "Object.Return");  	view_listener_t::addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");  	view_listener_t::addMenu(new LLObjectMute(), "Object.Mute"); diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index c9130b56b4..194213f880 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -863,12 +863,13 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu  	} // for  	bool standalone = mParent ? mParent->isStandalone() : false; +	bool wear_add_visible = mask & (MASK_CLOTHING|MASK_ATTACHMENT) && n_worn == 0 && can_be_worn && (n_already_worn != 0 || mask & MASK_ATTACHMENT);  	// *TODO: eliminate multiple traversals over the menu items  	setMenuItemVisible(menu, "wear_wear", 			n_already_worn == 0 && n_worn == 0 && can_be_worn);  	setMenuItemEnabled(menu, "wear_wear", 			n_already_worn == 0 && n_worn == 0); -	setMenuItemVisible(menu, "wear_add",			mask == MASK_CLOTHING && n_worn == 0 && n_already_worn != 0 && can_be_worn); -	setMenuItemEnabled(menu, "wear_add",			n_items == 1 && canAddWearable(ids.front()) && n_already_worn != 0); +	setMenuItemVisible(menu, "wear_add",			wear_add_visible); +	setMenuItemEnabled(menu, "wear_add",			n_items == 1 && canAddWearable(ids.front()));  	setMenuItemVisible(menu, "wear_replace",		n_worn == 0 && n_already_worn != 0 && can_be_worn);  	//visible only when one item selected and this item is worn  	setMenuItemVisible(menu, "edit",				!standalone && mask & (MASK_CLOTHING|MASK_BODYPART) && n_worn == n_items && n_worn == 1); @@ -984,7 +985,18 @@ bool LLWearableItemsList::ContextMenu::canAddWearable(const LLUUID& item_id)  	// TODO: investigate wearables may not be loaded at this point EXT-8231  	LLViewerInventoryItem* item = gInventory.getItem(item_id); -	if (!item || item->getType() != LLAssetType::AT_CLOTHING) +	if (!item) +	{ +		return false; +	} + +	if (item->getType() == LLAssetType::AT_OBJECT) +	{ +		// *TODO: is this the right check? +		return isAgentAvatarValid() && gAgentAvatarp->canAttachMoreObjects(); +	} + +	if (item->getType() != LLAssetType::AT_CLOTHING)  	{  		return false;  	} diff --git a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml index 8ec7689819..76f68c6d4b 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml @@ -89,6 +89,15 @@       function="Object.EnableWear" />    </menu_item_call>      <menu_item_call +   label="Add" +   layout="topleft" +   name="add"> +    <menu_item_call.on_click +     function="Object.AttachAddToAvatar" /> +    <menu_item_call.on_visible +     function="Object.EnableWear" /> +  </menu_item_call> +  <menu_item_call     label="Report"     layout="topleft"     name="report"> diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index b6cc222e96..31f70d99ca 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -83,6 +83,15 @@              <menu_item_call.on_enable               function="Object.EnableWear" />     </menu_item_call> +   <menu_item_call +      enabled="false" +      label="Add" +      name="Add"> +            <menu_item_call.on_click +             function="Object.AttachAddToAvatar" /> +            <menu_item_call.on_enable +             function="Object.EnableWear" /> +   </menu_item_call>     <context_menu           label="Attach  ▶"           name="Object Attach" /> diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml index 8af2e1eaca..5feac53c33 100644 --- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml @@ -13,7 +13,7 @@       layout="topleft"       name="wear_wear">          <on_click -         function="Wearable.Add" /> +         function="Wearable.Wear" />      </menu_item_call>      <menu_item_call       label="Add" diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 2c9d7e4b6a..082d51ed3c 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -97,6 +97,8 @@  	     name="location_combo"  	     top_delta="0"  	     width="266"> +         <combo_list +         mouse_wheel_opaque="true"/>  	     <!-- *TODO: Delete.  Let the location_input use the correct art sizes.  	        <location_input.add_landmark_button  	         height="18" diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_list.xml b/indra/newview/skins/default/xui/en/widgets/scroll_list.xml index 63166f32b7..dd93675807 100644 --- a/indra/newview/skins/default/xui/en/widgets/scroll_list.xml +++ b/indra/newview/skins/default/xui/en/widgets/scroll_list.xml @@ -12,6 +12,7 @@               draw_stripes="true"               scroll_bar_bg_visible="false"               scroll_bar_bg_color="black" +             mouse_wheel_opaque="false"               background_visible="true"               heading_height="23"               draw_border="false"  | 
