diff options
| -rw-r--r-- | indra/llcommon/llstring.cpp | 6 | ||||
| -rw-r--r-- | indra/llui/llaccordionctrl.cpp | 11 | ||||
| -rw-r--r-- | indra/llui/llaccordionctrltab.cpp | 15 | ||||
| -rw-r--r-- | indra/llui/llaccordionctrltab.h | 1 | ||||
| -rw-r--r-- | indra/newview/llinventoryicon.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 29 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_buy_land.xml | 24 | 
7 files changed, 69 insertions, 18 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 671b0a108c..2693c0e22b 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -673,9 +673,9 @@ std::string ll_convert_wide_to_string(const wchar_t* in, unsigned int code_page)  wchar_t* ll_convert_string_to_wide(const std::string& in, unsigned int code_page)  {  	// From review: -	// We can preallocate a wide char buffer that is the same length (in wchar_t elements) as the utf8 input,
 -	// plus one for a null terminator, and be guaranteed to not overflow.
 -
 +	// We can preallocate a wide char buffer that is the same length (in wchar_t elements) as the utf8 input, +	// plus one for a null terminator, and be guaranteed to not overflow. +  	//	Normally, I'd call that sort of thing premature optimization,  	// but we *are* seeing string operations taking a bunch of time, especially when constructing widgets.  //	int output_str_len = MultiByteToWideChar(code_page, 0, in.c_str(), in.length(), NULL, 0); diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 2bc8ea054a..c3ef734823 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -765,6 +765,17 @@ S32	LLAccordionCtrl::notifyParent(const LLSD& info)  			}  			return 0;  		} +		else if(str_action == "deselect_current") +		{ +			// Reset selection to the currently selected tab. +			if (mSelectedTab) +			{ +				mSelectedTab->setSelected(false); +				mSelectedTab = NULL; +				return 1; +			} +			return 0; +		}  	}  	else if (info.has("scrollToShowRect"))  	{ diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 37fc571bbd..d8760d5cdb 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -371,9 +371,11 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p)  	mHeader = LLUICtrlFactory::create<LLAccordionCtrlTabHeader>(headerParams);  	addChild(mHeader, 1); -	if (p.selection_enabled) +	LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this)); + +	if (!p.selection_enabled)  	{ -		LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this)); +		LLFocusableElement::setFocusLostCallback(boost::bind(&LLAccordionCtrlTab::deselectOnFocusLost, this));  	}  	reshape(100, 200,FALSE); @@ -598,6 +600,15 @@ void LLAccordionCtrlTab::selectOnFocusReceived()  		getParent()->notifyParent(LLSD().with("action", "select_current"));  } +void LLAccordionCtrlTab::deselectOnFocusLost() +{ +	if(getParent()) // A parent may not be set if tabs are added dynamically. +	{ +		getParent()->notifyParent(LLSD().with("action", "deselect_current")); +	} + +} +  S32 LLAccordionCtrlTab::getHeaderHeight()  {  	return mHeaderVisible?HEADER_HEIGHT:0;  diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 5646a355d0..0ef9c407f1 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -220,6 +220,7 @@ protected:  	LLView* findContainerView	();  	void selectOnFocusReceived(); +	void deselectOnFocusLost();  private: diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp index 3090371a73..2201481df3 100644 --- a/indra/newview/llinventoryicon.cpp +++ b/indra/newview/llinventoryicon.cpp @@ -117,6 +117,7 @@ const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type,  	if (item_is_multi)  	{  		idx = ICONNAME_OBJECT_MULTI; +		return getIconName(idx);  	}  	switch(asset_type) diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 38f637cabf..58a5529505 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -841,15 +841,38 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)  	bool more_than_one_selected = ids.size() > 1;  	bool is_dummy_item = (ids.size() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem())); -	//selected and expanded accordion tabs determine filtering when no item is selected +	// selected, expanded accordion tabs and selection in flat list view determine filtering when no item is selected in COF +	// selection in flat list view participates in determining filtering because of EXT-7963 +	// So the priority of criterions in is: +	//                   1. Selected accordion tab            |  IF (any accordion selected) +	//                                                        |     filter_type = selected_accordion_type +	//                   2. Selected item in flat list view   |  ELSEIF (any item in flat list view selected) +	//                                                        |     filter_type = selected_item_type +	//                   3. Expanded accordion tab            |  ELSEIF (any accordion expanded) +	//                                                        |      filter_type = expanded accordion_type  	if (nothing_selected)  	{  		showWearablesListView(); -		//selected accordion tab is more priority than expanded tab when determining filtering +		//selected accordion tab is more priority than expanded tab +		//and selected item in flat list view of 'Add more' panel when +		//determining filtering  		LLAssetType::EType type = mCOFWearables->getSelectedAccordionAssetType();  		if (type == LLAssetType::AT_NONE) -		{ +		{ //no accordion selected + +			// when no accordion selected then selected item from flat list view +			// has more priority than expanded when determining filtering +			LLUUID selected_item_id = mWearableItemsList->getSelectedUUID(); +			LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id); +			if(item) +			{ +				showFilteredWearablesListView(item->getWearableType()); +				return; +			} + +			// when no accordion selected and no selected items in flat list view +			// determine filtering according to expanded accordion  			type = mCOFWearables->getExpandedAccordionAssetType();  		} diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index 0ad4fbc967..c88de878f4 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -529,13 +529,14 @@ sold with objects       length="1"       follows="top|left"       font="SansSerifBig" -     height="16" +     height="32"       layout="topleft"       left="72"       name="account_action"       right="438"       top="200" -     width="218"> +     width="218" +     wrap="true">          Upgrade you to premium membership.      </text>      <text @@ -577,19 +578,21 @@ sold with objects       layout="topleft"       left="0"       name="step_2" +     top_pad="-10"       width="64" />      <text       type="string"       length="1"       follows="top|left"       font="SansSerifBig" -     height="16" +     height="32"       layout="topleft"       left="72"       name="land_use_action"       right="438"       top="284" -     width="218"> +     width="218" +     wrap="true">          Increase your monthly land use fees to US$ 40/month.      </text>      <text @@ -620,14 +623,15 @@ This parcel is 512 m² of land.      <text       type="string"       length="1" -     bottom_delta="-38" +     bottom_delta="-22"       follows="top|left"       font="SansSerifBig" -     height="16" +     height="32"       layout="topleft"       left="72"       name="purchase_action" -     right="438"> +     right="438" +     wrap="true">          Pay Joe Resident L$ 4000 for the land      </text>      <text @@ -665,7 +669,7 @@ This parcel is 512 m² of land.       layout="topleft"       left="170"       name="currency_amt" -     top="408" +     top="424"       width="80">          1000      </line_editor> @@ -681,7 +685,7 @@ This parcel is 512 m² of land.       layout="topleft"       left="260"       name="currency_est" -     top="409" +     top="425"       width="178">          for approx. [LOCAL_AMOUNT]      </text> @@ -713,7 +717,7 @@ This parcel is 512 m² of land.       layout="topleft"       left="70"       name="buy_btn" -     top="448" +     top="460"       width="100" />      <button       follows="bottom|right"  | 
