summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/CMakeLists.txt6
-rw-r--r--indra/llui/llfolderview.cpp2
-rw-r--r--indra/llui/llfolderviewitem.cpp14
-rw-r--r--indra/llui/llfolderviewitem.h15
-rw-r--r--indra/llui/llscrolllistctrl.cpp5
-rw-r--r--indra/llui/llviewereventrecorder.h1
6 files changed, 29 insertions, 14 deletions
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index f781ff4110..d96824bbf8 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -13,7 +13,7 @@ include(LLCoreHttp)
include(LLRender)
include(LLWindow)
include(LLCoreHttp)
-include(LLVFS)
+include(LLFileSystem)
include(LLXML)
include_directories(
@@ -25,7 +25,7 @@ include_directories(
${LLMESSAGE_INCLUDE_DIRS}
${LLRENDER_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS}
- ${LLVFS_INCLUDE_DIRS}
+ ${LLFILESYSTEM_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
${LIBS_PREBUILD_DIR}/include/hunspell
)
@@ -285,7 +285,7 @@ target_link_libraries(llui
${LLINVENTORY_LIBRARIES}
${LLMESSAGE_LIBRARIES}
${LLCOREHTTP_LIBRARIES}
- ${LLVFS_LIBRARIES} # ugh, just for LLDir
+ ${LLFILESYSTEM_LIBRARIES}
${LLXUIXML_LIBRARIES}
${LLXML_LIBRARIES}
${LLMATH_LIBRARIES}
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 622c9edba7..54fdee6901 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -257,6 +257,8 @@ LLFolderView::LLFolderView(const Params& p)
mPopupMenuHandle = menu->getHandle();
mViewModelItem->openItem();
+
+ mAreChildrenInited = true; // root folder is a special case due to not being loaded normally, assume that it's inited.
}
// Destroys the object
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 285bf9f484..eba93beed9 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -132,7 +132,6 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mCutGeneration(0),
mLabelStyle( LLFontGL::NORMAL ),
mHasVisibleChildren(FALSE),
- mIsFolderComplete(true),
mLocalIndentation(p.folder_indentation),
mIndentation(0),
mItemHeight(p.item_height),
@@ -1003,11 +1002,11 @@ LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ):
mCurHeight(0.f),
mTargetHeight(0.f),
mAutoOpenCountdown(0.f),
+ mIsFolderComplete(false), // folder might have children that are not loaded yet.
+ mAreChildrenInited(false), // folder might have children that are not built yet.
mLastArrangeGeneration( -1 ),
mLastCalculatedWidth(0)
{
- // folder might have children that are not loaded yet. Mark it as incomplete until chance to check it.
- mIsFolderComplete = false;
}
void LLFolderViewFolder::updateLabelRotation()
@@ -1063,13 +1062,16 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
{
// Sort before laying out contents
// Note that we sort from the root (CHUI-849)
- getRoot()->getFolderViewModel()->sort(this);
+ if (mAreChildrenInited)
+ {
+ getRoot()->getFolderViewModel()->sort(this);
+ }
LL_RECORD_BLOCK_TIME(FTM_ARRANGE);
// evaluate mHasVisibleChildren
mHasVisibleChildren = false;
- if (getViewModelItem()->descendantsPassedFilter())
+ if (mAreChildrenInited && getViewModelItem()->descendantsPassedFilter())
{
// We have to verify that there's at least one child that's not filtered out
bool found = false;
@@ -1095,7 +1097,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
mHasVisibleChildren = found;
}
- if (!mIsFolderComplete)
+ if (!mIsFolderComplete && mAreChildrenInited)
{
mIsFolderComplete = getFolderViewModel()->isFolderComplete(this);
}
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index 616d2e7d86..ee20d048fd 100644
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -116,7 +116,6 @@ protected:
F32 mControlLabelRotation;
LLFolderView* mRoot;
bool mHasVisibleChildren,
- mIsFolderComplete, // indicates that some children were not loaded/added yet
mIsCurSelection,
mDragAndDropTarget,
mIsMouseOverTitle,
@@ -219,7 +218,10 @@ public:
BOOL hasVisibleChildren() { return mHasVisibleChildren; }
// true if object can't have children
- BOOL isFolderComplete() { return mIsFolderComplete; }
+ virtual bool isFolderComplete() { return true; }
+ // true if object can't have children
+ virtual bool areChildrenInited() { return true; }
+ virtual void setChildrenInited(bool inited) { }
// Call through to the viewed object and return true if it can be
// removed. Returns true if it's removed.
@@ -334,6 +336,8 @@ protected:
S32 mLastArrangeGeneration;
S32 mLastCalculatedWidth;
bool mNeedsSort;
+ bool mIsFolderComplete; // indicates that some children were not loaded/added yet
+ bool mAreChildrenInited; // indicates that no children were initialized
public:
typedef enum e_recurse_type
@@ -385,6 +389,13 @@ public:
// destroys this folder, and all children
virtual void destroyView();
+ // whether known children are fully loaded (arrange sets to true)
+ virtual bool isFolderComplete() { return mIsFolderComplete; }
+
+ // whether known children are fully built
+ virtual bool areChildrenInited() { return mAreChildrenInited; }
+ virtual void setChildrenInited(bool inited) { mAreChildrenInited = inited; }
+
// extractItem() removes the specified item from the folder, but
// doesn't delete it.
virtual void extractItem( LLFolderViewItem* item, bool deparent_model = true);
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index de644185fd..a63457bdea 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -336,8 +336,7 @@ LLScrollListCtrl::~LLScrollListCtrl()
std::for_each(mItemList.begin(), mItemList.end(), DeletePointer());
mItemList.clear();
- std::for_each(mColumns.begin(), mColumns.end(), DeletePairedPointer());
- mColumns.clear();
+ clearColumns(); //clears columns and deletes headers
delete mIsFriendSignal;
}
@@ -3011,6 +3010,8 @@ void LLScrollListCtrl::clearColumns()
mSortColumns.clear();
mTotalStaticColumnWidth = 0;
mTotalColumnPadding = 0;
+
+ dirtyColumns(); // Clears mColumnsIndexed
}
void LLScrollListCtrl::setColumnLabel(const std::string& column, const std::string& label)
diff --git a/indra/llui/llviewereventrecorder.h b/indra/llui/llviewereventrecorder.h
index d1059d55de..94e66f5dc4 100644
--- a/indra/llui/llviewereventrecorder.h
+++ b/indra/llui/llviewereventrecorder.h
@@ -32,7 +32,6 @@
#include "lldir.h"
#include "llsd.h"
#include "llfile.h"
-#include "llvfile.h"
#include "lldate.h"
#include "llsdserialize.h"
#include "llkeyboard.h"