Fix initialization order in LLScrollListCtrl: Can only set sort column after we created the actual columns
parent
d9811f214a
commit
fc31cf7a29
|
|
@ -280,11 +280,12 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
|
|||
addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (p.sort_column >= 0)
|
||||
{
|
||||
sortByColumnIndex(p.sort_column, p.sort_ascending);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Can only set sort column after we created the actual columns
|
||||
//if (p.sort_column >= 0)
|
||||
//{
|
||||
// sortByColumnIndex(p.sort_column, p.sort_ascending);
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
for (LLInitParam::ParamIterator<LLScrollListColumn::Params>::const_iterator row_it = p.contents.columns.begin();
|
||||
row_it != p.contents.columns.end();
|
||||
|
|
@ -296,6 +297,13 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
|
|||
mColumnInitParams.push_back(*row_it);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Can only set sort column after we created the actual columns
|
||||
if (p.sort_column >= 0)
|
||||
{
|
||||
sortByColumnIndex(p.sort_column, p.sort_ascending);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
for (LLInitParam::ParamIterator<LLScrollListItem::Params>::const_iterator row_it = p.contents.rows.begin();
|
||||
row_it != p.contents.rows.end();
|
||||
++row_it)
|
||||
|
|
|
|||
Loading…
Reference in New Issue