summaryrefslogtreecommitdiff
path: root/indra/llui/llscrolllistctrl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-06-27 16:16:56 -0500
committerDave Parks <davep@lindenlab.com>2013-06-27 16:16:56 -0500
commit380785e613b9823cb6160be5678e5f01783fee5f (patch)
treedce0f35d02994c861428683b91f64371e9a64ea0 /indra/llui/llscrolllistctrl.cpp
parent21b78d7368f969fdf0daf7994fb565da633b1e71 (diff)
parent4696eeeb30ce4d01c3bcbe74c9024f05d848968a (diff)
Automated merge with https://bitbucket.org/lindenlab/viewer-development-materials
Diffstat (limited to 'indra/llui/llscrolllistctrl.cpp')
-rwxr-xr-xindra/llui/llscrolllistctrl.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 7f04c92b27..4adfd42edd 100755
--- 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++)