diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-06-22 19:26:28 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-06-22 19:26:28 +0300 |
commit | 7cd62f4908218e6cfd176fc8b45a5f1bc4279219 (patch) | |
tree | 156000d6730450340655e4f837c310a22a232a6c /indra/newview | |
parent | 3e0f31f406d4376fd9cd59b306fda5775ea5c4e6 (diff) |
MAINT-5274 Missing folder arrow
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfolderviewmodelinventory.cpp | 23 | ||||
-rwxr-xr-x | indra/newview/llfolderviewmodelinventory.h | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 3271a40ea0..5fad76eeec 100755 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -108,6 +108,29 @@ bool LLFolderViewModelInventory::contentsReady() return !LLInventoryModelBackgroundFetch::instance().folderFetchActive(); } +bool LLFolderViewModelInventory::isFolderComplete(LLFolderViewFolder* folder) +{ + LLFolderViewModelItemInventory* modelp = static_cast<LLFolderViewModelItemInventory*>(folder->getViewModelItem()); + LLUUID cat_id = modelp->getUUID(); + if (cat_id.isNull()) + { + return false; + } + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (cat) + { + // don't need to check version - descendents_server == -1 if we have no data + S32 descendents_server = cat->getDescendentCount(); + S32 descendents_actual = cat->getViewerDescendentCount(); + if (descendents_server == descendents_actual + || (descendents_actual > 0 && descendents_server == -1)) // content was loaded in previous session + { + return true; + } + } + return false; +} + void LLFolderViewModelItemInventory::requestSort() { LLFolderViewModelItemCommon::requestSort(); diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h index 8772185ad0..6fe35666f2 100755 --- a/indra/newview/llfolderviewmodelinventory.h +++ b/indra/newview/llfolderviewmodelinventory.h @@ -113,6 +113,7 @@ public: void sort(LLFolderViewFolder* folder); bool contentsReady(); + bool isFolderComplete(LLFolderViewFolder* folder); bool startDrag(std::vector<LLFolderViewModelItem*>& items); private: |