diff options
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 68 |
1 files changed, 25 insertions, 43 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 368e3caea8..9b802157f2 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -219,11 +219,11 @@ void LLFolderViewItem::refresh() mIconOpen = vmi.getIconOpen(); mIconOverlay = vmi.getIconOverlay(); - if (mRoot->useLabelSuffix()) - { + if (mRoot->useLabelSuffix()) + { mLabelStyle = vmi.getLabelStyle(); mLabelSuffix = vmi.getLabelSuffix(); -} + } //TODO RN: make sure this logic still fires //std::string searchable_label(mLabel); @@ -253,7 +253,7 @@ void LLFolderViewItem::arrangeAndSet(BOOL set_selection, LLFolderView* root = getRoot(); if (getParentFolder()) { - getParentFolder()->requestArrange(); + getParentFolder()->requestArrange(); } if(set_selection) { @@ -273,9 +273,9 @@ std::set<LLFolderViewItem*> LLFolderViewItem::getSelectionList() const } // addToFolder() returns TRUE if it succeeds. FALSE otherwise -BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder) +void LLFolderViewItem::addToFolder(LLFolderViewFolder* folder) { - return folder->addItem(this); + folder->addItem(this); } @@ -416,12 +416,12 @@ void LLFolderViewItem::rename(const std::string& new_name) { getViewModelItem()->renameItem(new_name); - if(mParentFolder) - { - mParentFolder->requestSort(); - } - } + //if(mParentFolder) + //{ + // mParentFolder->requestSort(); + //} } +} const std::string& LLFolderViewItem::getName( void ) const { @@ -836,9 +836,9 @@ LLFolderViewFolder::~LLFolderViewFolder( void ) } // addToFolder() returns TRUE if it succeeds. FALSE otherwise -BOOL LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder) +void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder) { - return folder->addFolder(this); + folder->addFolder(this); } static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange"); @@ -1005,11 +1005,6 @@ BOOL LLFolderViewFolder::needsArrange() return mLastArrangeGeneration < getRoot()->getArrangeGeneration(); } -void LLFolderViewFolder::requestSort() -{ - getViewModelItem()->requestSort(); -} - //TODO RN: get height resetting working //void LLFolderViewFolder::setPassedFilter(BOOL passed, BOOL passed_folder, S32 filter_generation) //{ @@ -1414,7 +1409,6 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) } //item has been removed, need to update filter getViewModelItem()->removeChild(item->getViewModelItem()); - getViewModelItem()->dirtyFilter(); //because an item is going away regardless of filter status, force rearrange requestArrange(); removeChild(item); @@ -1480,7 +1474,7 @@ BOOL LLFolderViewFolder::isRemovable() } // this is an internal method used for adding items to folders. -BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) +void LLFolderViewFolder::addItem(LLFolderViewItem* item) { if (item->getParentFolder()) { @@ -1493,7 +1487,6 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) item->setRect(LLRect(0, 0, getRect().getWidth(), 0)); item->setVisible(FALSE); - addChild(item); // TODO RN - port creation date management to new code location #if 0 @@ -1501,10 +1494,7 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate())); #endif - // Handle sorting - requestArrange(); - requestSort(); - + addChild(item); getViewModelItem()->addChild(item->getViewModelItem()); // TODO RN - port creation date management to new code location #if 0 @@ -1530,14 +1520,10 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) // parentp = parentp->getParentFolder(); //} - - item->getViewModelItem()->dirtyFilter(); - - return TRUE; } // this is an internal method used for adding items to folders. -BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder) +void LLFolderViewFolder::addFolder(LLFolderViewFolder* folder) { if (folder->mParentFolder) { @@ -1548,30 +1534,26 @@ BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder) folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); folder->setVisible(FALSE); - addChild( folder ); // rearrange all descendants too, as our indentation level might have changed - folder->requestArrange(); - requestSort(); + //folder->requestArrange(); + //requestSort(); + addChild( folder ); getViewModelItem()->addChild(folder->getViewModelItem()); - //After addChild since addChild assigns parent to bubble up to when calling dirtyFilter - folder->getViewModelItem()->dirtyFilter(); - - return TRUE; } void LLFolderViewFolder::requestArrange() { //if ( mLastArrangeGeneration != -1) { - mLastArrangeGeneration = -1; - // flag all items up to root - if (mParentFolder) - { - mParentFolder->requestArrange(); - } + mLastArrangeGeneration = -1; + // flag all items up to root + if (mParentFolder) + { + mParentFolder->requestArrange(); } } +} void LLFolderViewFolder::toggleOpen() { |