summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2011-05-09 11:26:24 -0700
committerbrad kittenbrink <brad@lindenlab.com>2011-05-09 11:26:24 -0700
commit2661a4c2c9359f2c2cabce6f48704dc8fb481994 (patch)
treed6fafbb1a084ea8b06db3d3499bd5084b7e4f7f6 /indra/newview/llpanelmaininventory.cpp
parent26334a4c57e58bfd13e6bbbff2298ec5ba3e77e7 (diff)
parenta5118ccd6721afdf4f8c71cba6007eb7be4d7c19 (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 90617b7dc7..f79a1bb5ab 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();
}