diff options
| -rw-r--r-- | indra/llui/llscrolllistcolumn.cpp | 3 | ||||
| -rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 14 | ||||
| -rw-r--r-- | indra/llui/llscrolllistctrl.h | 2 | ||||
| -rw-r--r-- | indra/newview/llnamelistctrl.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llnamelistctrl.h | 2 | 
5 files changed, 15 insertions, 10 deletions
| diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index af124d9826..cc9ff7a487 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -236,7 +236,8 @@ void LLScrollColumnHeader::handleReshape(const LLRect& new_rect, bool by_user)  		// tell scroll list to layout columns again  		// do immediate update to get proper feedback to resize handle  		// which needs to know how far the resize actually went -		mColumn->mParentCtrl->updateColumns(); +		const bool force_update = true; +		mColumn->mParentCtrl->updateColumns(force_update);  	}  } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index d332aa933e..e6a9049fa6 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -615,7 +615,6 @@ S32 LLScrollListCtrl::calcMaxContentWidth()  		if (mColumnWidthsDirty)  		{ -			mColumnWidthsDirty = false;  			// update max content width for this column, by looking at all items  			column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel) + mColumnPadding + HEADING_TEXT_PADDING : 0;  			item_list::iterator iter; @@ -629,6 +628,7 @@ S32 LLScrollListCtrl::calcMaxContentWidth()  		}  		max_item_width += column->mMaxContentWidth;  	} +	mColumnWidthsDirty = false;  	return max_item_width;  } @@ -643,7 +643,7 @@ bool LLScrollListCtrl::updateColumnWidths()  		if (!column) continue;  		// update column width -		S32 new_width = column->getWidth(); +		S32 new_width = 0;  		if (column->mRelWidth >= 0)  		{  			new_width = (S32)llround(column->mRelWidth*mItemListRect.getWidth()); @@ -652,6 +652,10 @@ bool LLScrollListCtrl::updateColumnWidths()  		{  			new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding) / mNumDynamicWidthColumns;  		} +		else +		{ +			new_width = column->getWidth(); +		}  		if (column->getWidth() != new_width)  		{ @@ -693,9 +697,9 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp)  } -void LLScrollListCtrl::updateColumns() +void LLScrollListCtrl::updateColumns(bool force_update)  { -	if (!mColumnsDirty) +	if (!mColumnsDirty && !force_update)  		return;  	mColumnsDirty = false; @@ -749,7 +753,7 @@ void LLScrollListCtrl::updateColumns()  	}  	// propagate column widths to individual cells -	if (columns_changed_width) +	if (columns_changed_width || force_update)  	{  		item_list::iterator iter;  		for (iter = mItemList.begin(); iter != mItemList.end(); iter++) diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 38450b6313..0b629a76f7 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -342,7 +342,7 @@ public:  	static void onClickColumn(void *userdata); -	virtual void updateColumns(); +	virtual void updateColumns(bool force_update = false);  	S32 calcMaxContentWidth();  	bool updateColumnWidths(); diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index b0fbad33b0..1f1f89349a 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -409,9 +409,9 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,  } -void LLNameListCtrl::updateColumns() +void LLNameListCtrl::updateColumns(bool force_update)  { -	LLScrollListCtrl::updateColumns(); +	LLScrollListCtrl::updateColumns(force_update);  	if (!mNameColumn.empty())  	{ diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 3ac0565761..09c3d49fe7 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -142,7 +142,7 @@ public:  	void sortByName(BOOL ascending); -	/*virtual*/ void updateColumns(); +	/*virtual*/ void updateColumns(bool force_update);  	/*virtual*/ void	mouseOverHighlightNthItem( S32 index );  private: | 
