summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-05-04 11:17:19 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-05-04 11:17:19 -0700
commit90cad613b029f71a131303d6efaadd22aba21626 (patch)
tree2d2c48fa6f69a478b51ded1b8da578e2a43c5cfe /indra/newview/llpanelmaininventory.cpp
parentf3bb2e31dc6a1e8e02854a70db4ecd4cf586d4ba (diff)
parent3f9253e783826bbe27a995786be8305f8ecb2d6d (diff)
hg 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();
}