From 6bbcf67db399a46592086c623118d18163a70452 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 20 Jan 2012 17:03:04 -0800 Subject: EXP-1152 : Fix width computation in inventory panel so that the horizontal slider shows up only when really needed. --- indra/newview/llfolderviewitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 8d6114c887..9944a9dd3d 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -423,7 +423,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) : 0; if (mLabelWidthDirty) { - mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mSearchableLabel); + mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix); mLabelWidthDirty = false; } -- cgit v1.2.3 From 2cd7a7550991df90288aa4c7e2fbe2598cc3c296 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 27 Jan 2012 18:40:23 -0800 Subject: EXP-1747, EXP-1152 : Fixed visual glitches in computation of visible width in inventory. --- indra/newview/llfolderviewitem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 9944a9dd3d..734adbc648 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -410,8 +410,8 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo } -// Finds width and height of this object and it's children. Also -// makes sure that this view and it's children are the right size. +// Finds width and height of this object and its children. Also +// makes sure that this view and its children are the right size. S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) { const Params& p = LLUICtrlFactory::getDefaultParams(); @@ -423,7 +423,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) : 0; if (mLabelWidthDirty) { - mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix); + mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + TEXT_PAD_RIGHT; mLabelWidthDirty = false; } -- cgit v1.2.3 From c744603af9b53c6bc73fefbd56de68cf2778ed70 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 7 Feb 2012 17:13:24 -0800 Subject: EXP-1873 : Implement cut in the inventory contextual menu. Works without deleting the items but simply dimming them and moving them. Doesn't work for folders yet. --- indra/newview/llfolderviewitem.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 734adbc648..37ef27a5d7 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -40,6 +40,7 @@ #include "llviewerwindow.h" // Argh, only for setCursor() // linden library includes +#include "llclipboard.h" #include "llfocusmgr.h" // gFocusMgr #include "lltrans.h" @@ -1002,7 +1003,13 @@ void LLFolderViewItem::draw() LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; if (highlight_link) color = sLinkColor; if (in_library) color = sLibraryColor; - + + // Cut state rendering tweak (experimental) + if (LLClipboard::getInstance()->isCutMode() && LLClipboard::getInstance()->isOnClipboard(getListener()->getUUID())) + { + color.setAlpha(0.5); + } + F32 right_x = 0; F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); -- cgit v1.2.3 From 91f77318db63d4b2560390551306056c4a6cc2d5 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 8 Feb 2012 15:44:02 -0800 Subject: EXP-1873 : Implement the hiding of cut items on the clipboard --- indra/newview/llfolderviewitem.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 37ef27a5d7..884cddfe7f 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1004,12 +1004,6 @@ void LLFolderViewItem::draw() if (highlight_link) color = sLinkColor; if (in_library) color = sLibraryColor; - // Cut state rendering tweak (experimental) - if (LLClipboard::getInstance()->isCutMode() && LLClipboard::getInstance()->isOnClipboard(getListener()->getUUID())) - { - color.setAlpha(0.5); - } - F32 right_x = 0; F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); -- cgit v1.2.3 From 4523b3137850df8922b12cc966633a3d5bb84374 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 9 Feb 2012 12:58:43 -0800 Subject: EXP-1844 FIX Selecting a large number of inventory items can block the viewer for a long time. only show hourglass and fetching text when downloading folders, not item metadata --- indra/newview/llfolderviewitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 734adbc648..afad27b4e0 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1045,7 +1045,7 @@ void LLFolderViewItem::draw() } if ((mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) - || (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() + || (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && root_is_loading && mShowLoadStatus)) { -- cgit v1.2.3 From a7499dc4abfa5fa7582dc7ebb535a07ed94d0c4f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 23 Feb 2012 09:57:05 -0800 Subject: EXP-1895 : Fix the evaluation of visible children in folders --- indra/newview/llfolderviewitem.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 884cddfe7f..0b4baf52f9 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1159,7 +1159,36 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation) mNeedsSort = false; } + // evaluate mHasVisibleChildren mHasVisibleChildren = hasFilteredDescendants(filter_generation); + if (mHasVisibleChildren) + { + // We have to verify that there's at least one child that's not filtered out + bool found = false; + // Try the items first + for (items_t::iterator iit = mItems.begin(); iit != mItems.end(); ++iit) + { + LLFolderViewItem* itemp = (*iit); + found = (itemp->getFiltered(filter_generation)); + if (found) + break; + } + if (!found) + { + // If no item found, try the folders + for (folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) + { + LLFolderViewFolder* folderp = (*fit); + found = ( folderp->getListener() + && (folderp->getFiltered(filter_generation) + || (folderp->getFilteredFolder(filter_generation) + && folderp->hasFilteredDescendants(filter_generation)))); + if (found) + break; + } + } + mHasVisibleChildren = found; + } // calculate height as a single item (without any children), and reshapes rectangle to match LLFolderViewItem::arrange( width, height, filter_generation ); -- cgit v1.2.3 From b2085efa8bad3da7442f35f92c8fe7c65019e182 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 22 Mar 2012 12:27:55 -0700 Subject: CHUI-68 FIX Using arrow keys to scroll through inventory folders does not scroll content in view as a side effect, "My Inventory" is not selected by default auto selection of filtered items now reliably turns itself off as soon as user scrolls or moves keyboard focus to inventory --- indra/newview/llfolderviewitem.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 712d3e4583..dce0981a3e 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -221,6 +221,11 @@ BOOL LLFolderViewItem::potentiallyVisible() { // we haven't been checked against min required filter // or we have and we passed + return potentiallyFiltered(); +} + +BOOL LLFolderViewItem::potentiallyFiltered() +{ return getLastFilterGeneration() < getRoot()->getFilter()->getMinRequiredGeneration() || getFiltered(); } @@ -1375,7 +1380,8 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) && !mPassedFilter) // and did not pass the filter { // go ahead and flag this folder as done - mLastFilterGeneration = filter_generation; + mLastFilterGeneration = filter_generation; + mStringMatchOffset = std::string::npos; } else // filter self only on first pass through { -- cgit v1.2.3 From 6e4e971fd27826f90c1728c7fd17242083e230fc Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 23 Mar 2012 18:31:09 -0700 Subject: EXP-1925 WIP Inventory folders being pasted to are hidden during a paste operation potential fix by not changing mostfiltereddescendant flag when dirtying folder as new contents arrive --- indra/newview/llfolderviewitem.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index dce0981a3e..d2b4866987 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1165,8 +1165,8 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation) } // evaluate mHasVisibleChildren - mHasVisibleChildren = hasFilteredDescendants(filter_generation); - if (mHasVisibleChildren) + mHasVisibleChildren = false; + if (hasFilteredDescendants(filter_generation)) { // We have to verify that there's at least one child that's not filtered out bool found = false; @@ -1192,6 +1192,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation) break; } } + mHasVisibleChildren = found; } @@ -1346,7 +1347,7 @@ void LLFolderViewFolder::requestSort() void LLFolderViewFolder::setCompletedFilterGeneration(S32 generation, BOOL recurse_up) { - mMostFilteredDescendantGeneration = llmin(mMostFilteredDescendantGeneration, generation); + //mMostFilteredDescendantGeneration = llmin(mMostFilteredDescendantGeneration, generation); mCompletedFilterGeneration = generation; // only aggregate up if we are a lower (older) value if (recurse_up -- cgit v1.2.3