summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-05-13 10:29:52 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-05-13 10:29:52 -0400
commit4046e0801ba4f7a01311de06b110177630ea6e04 (patch)
tree47ad154496cb50ef39617cf1b9ddc147d1358076 /indra/newview/llpanelmaininventory.cpp
parent40325a7347a059f913e01b449c924b13d1471e23 (diff)
parent8017900e7f536663153451ff788d8662427782ed (diff)
merge
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 85c57b4900..bc4998dd0c 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -139,6 +139,7 @@ BOOL LLPanelMainInventory::postBuild()
mActivePanel->getFilter()->markDefault();
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
mActivePanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mActivePanel, _1, _2));
+ mResortActivePanel = true;
}
LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>("Recent Items");
if (recent_items_panel)
@@ -528,6 +529,17 @@ void LLPanelMainInventory::draw()
{
mFilterEditor->setText(mFilterSubString);
}
+ if (mActivePanel && mResortActivePanel)
+ {
+ // EXP-756: Force resorting of the list the first time we draw the list:
+ // In the case of date sorting, we don't have enough information at initialization time
+ // to correctly sort the folders. Later manual resort doesn't do anything as the order value is
+ // set correctly. The workaround is to reset the order to alphabetical (or anything) then to the correct order.
+ U32 order = mActivePanel->getSortOrder();
+ mActivePanel->setSortOrder(LLInventoryFilter::SO_NAME);
+ mActivePanel->setSortOrder(order);
+ mResortActivePanel = false;
+ }
LLPanel::draw();
updateItemcountText();
}