From 1140ae3489a9e260a0abb808b4152f2d57384d67 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 29 Dec 2022 19:51:33 +0100 Subject: Add a texture inspector and show it when hovering over an inventory textory (or folder containing - among others - exactly one texture) and when hovering over notecard embedded textures --- indra/llui/llfolderview.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index ea2ca68e47..a6d4a2ae52 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1506,6 +1506,22 @@ BOOL LLFolderView::handleHover( S32 x, S32 y, MASK mask ) return LLView::handleHover( x, y, mask ); } +LLFolderViewItem* LLFolderView::getHoveredItem() const +{ + return dynamic_cast(mHoveredItem.get()); +} + +void LLFolderView::setHoveredItem(LLFolderViewItem* itemp) +{ + if (mHoveredItem.get() != itemp) + { + if (itemp) + mHoveredItem = itemp->getHandle(); + else + mHoveredItem.markDead(); + } +} + BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, -- cgit v1.2.3 From c74658b19b1ac28d5bf240e940a7ad97ff034e3c Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 2 Mar 2023 20:54:33 +0200 Subject: SL-19310 Update navigation buttons in single-folder view --- indra/llui/llfolderview.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 5170816671..46a7057240 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1273,6 +1273,11 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if(mSelectedItems.size()) { LLFolderViewItem* last_selected = getCurSelectedItem(); + if(last_selected && last_selected->isSingleFolderMode()) + { + handled = FALSE; + break; + } LLFolderViewItem* parent_folder = last_selected->getParentFolder(); if (!last_selected->isOpen() && parent_folder && parent_folder->getParentFolder()) { -- cgit v1.2.3 From 58092382269eb8dc48fb30734ee3738f7385f8da Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 4 Apr 2023 16:38:53 +0300 Subject: SL-19273 Show empty folder message for empty folders regardless of filter state --- indra/llui/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 46a7057240..734a7599aa 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -665,7 +665,7 @@ void LLFolderView::draw() } else if (mShowEmptyMessage) { - mStatusTextBox->setValue(getFolderViewModel()->getStatusText()); + mStatusTextBox->setValue(getFolderViewModel()->getStatusText(mItems.empty() && mFolders.empty())); mStatusTextBox->setVisible( TRUE ); // firstly reshape message textbox with current size. This is necessary to -- cgit v1.2.3 From 37530c9d736d90ec29b97e3567346a02e2826f97 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 12 Apr 2023 21:11:36 +0300 Subject: SL-19544 WIP hide inventory pane in Combination view, if there is no visible items --- indra/llui/llfolderview.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 734a7599aa..14985c6bad 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -189,7 +189,8 @@ LLFolderView::LLFolderView(const Params& p) mStatusTextBox(NULL), mShowItemLinkOverlays(p.show_item_link_overlays), mViewModel(p.view_model), - mGroupedItemModel(p.grouped_item_model) + mGroupedItemModel(p.grouped_item_model), + mForceArrange(false) { LLPanel* panel = p.parent_panel; mParentPanel = panel->getHandle(); @@ -1736,7 +1737,7 @@ void LLFolderView::update() mNeedsAutoSelect = FALSE; } - BOOL is_visible = isInVisibleChain(); + BOOL is_visible = isInVisibleChain() || mForceArrange; //Puts folders/items in proper positions // arrange() takes the model filter flag into account and call sort() if necessary (CHUI-849) -- cgit v1.2.3 From 706d8f17273f4718a2adf5a43c1de5a1dc08abad Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 18 May 2023 22:22:07 +0300 Subject: SL-19732 Fix folder's thumbnail from sticking over folder's content --- indra/llui/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 9fa8a84fa4..bf6f2436b1 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -2064,7 +2064,7 @@ LLFolderViewItem* LLFolderView::getNextUnselectedItem() return new_selection; } -S32 LLFolderView::getItemHeight() +S32 LLFolderView::getItemHeight() const { if(!hasVisibleChildren()) { -- cgit v1.2.3 From f83ed218327213ae809535f4739d9f9eff6374a3 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 22 May 2023 20:47:17 +0300 Subject: SL-19752 don't try to scroll after opening the new folder in single-folder view to avoid crash --- indra/llui/llfolderview.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index bf6f2436b1..7831aa92fb 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -833,9 +833,12 @@ void LLFolderView::autoOpenItem( LLFolderViewFolder* item ) mAutoOpenItems.push(item); item->setOpen(TRUE); + if(!item->isSingleFolderMode()) + { LLRect content_rect = (mScrollContainer ? mScrollContainer->getContentWindowRect() : LLRect()); LLRect constraint_rect(0,content_rect.getHeight(), content_rect.getWidth(), 0); scrollToShowItem(item, constraint_rect); + } } void LLFolderView::closeAutoOpenedFolders() -- cgit v1.2.3 From 572e8269bcd5320daa66f4074e927c79869bf7de Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 24 May 2023 22:51:02 +0300 Subject: SL-19604 Creating new folders in combination views does not highlight created item --- indra/llui/llfolderview.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 7831aa92fb..798c00d0ca 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -694,11 +694,18 @@ void LLFolderView::draw() } } - if (mRenameItem && mRenamer && mRenamer->getVisible() && !getVisibleRect().overlaps(mRenamer->getRect())) + if (mRenameItem + && mRenamer + && mRenamer->getVisible()) { - // renamer is not connected to the item we are renaming in any form so manage it manually - // TODO: consider stopping on any scroll action instead of when out of visible area - finishRenamingItem(); + LLRect renamer_rect; + localRectToOtherView(mRenamer->getRect(), &renamer_rect, mScrollContainer); + if (!mScrollContainer->getRect().overlaps(renamer_rect)) + { + // renamer is not connected to the item we are renaming in any form so manage it manually + // TODO: consider stopping on any scroll action instead of when out of visible area + finishRenamingItem(); + } } // skip over LLFolderViewFolder::draw since we don't want the folder icon, label, -- cgit v1.2.3 From 5c55adae47cab93a12793528373f639ea9e8efcf Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 30 May 2023 13:10:36 +0300 Subject: SL-19773 add context menu for root folder in single folder mode --- indra/llui/llfolderview.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 798c00d0ca..f0106e345c 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -190,7 +190,8 @@ LLFolderView::LLFolderView(const Params& p) mShowItemLinkOverlays(p.show_item_link_overlays), mViewModel(p.view_model), mGroupedItemModel(p.grouped_item_model), - mForceArrange(false) + mForceArrange(false), + mSingleFolderMode(false) { LLPanel* panel = p.parent_panel; mParentPanel = panel->getHandle(); @@ -1475,8 +1476,8 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) } } bool hide_folder_menu = mSuppressFolderMenu && isFolderSelected(); - if (menu && (handled - && ( count > 0 && (hasVisibleChildren()) )) && // show menu only if selected items are visible + if (menu && (mSingleFolderMode || (handled + && ( count > 0 && (hasVisibleChildren()) ))) && // show menu only if selected items are visible !hide_folder_menu) { if (mCallbackRegistrar) @@ -1918,6 +1919,11 @@ void LLFolderView::updateMenuOptions(LLMenuGL* menu) flags = multi_select_flag; } + if(mSingleFolderMode && (mSelectedItems.size() == 0)) + { + buildContextMenu(*menu, flags); + } + // This adds a check for restrictions based on the entire // selection set - for example, any one wearable may not push you // over the limit, but all wearables together still might. -- cgit v1.2.3 From 23311903106293f29e22d21314bdab03bbd499f7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 31 May 2023 19:28:48 +0300 Subject: Revert "SL-19795 Unified scroll" --- indra/llui/llfolderview.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index f0106e345c..70c2a79d25 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -695,18 +695,11 @@ void LLFolderView::draw() } } - if (mRenameItem - && mRenamer - && mRenamer->getVisible()) + if (mRenameItem && mRenamer && mRenamer->getVisible() && !getVisibleRect().overlaps(mRenamer->getRect())) { - LLRect renamer_rect; - localRectToOtherView(mRenamer->getRect(), &renamer_rect, mScrollContainer); - if (!mScrollContainer->getRect().overlaps(renamer_rect)) - { - // renamer is not connected to the item we are renaming in any form so manage it manually - // TODO: consider stopping on any scroll action instead of when out of visible area - finishRenamingItem(); - } + // renamer is not connected to the item we are renaming in any form so manage it manually + // TODO: consider stopping on any scroll action instead of when out of visible area + finishRenamingItem(); } // skip over LLFolderViewFolder::draw since we don't want the folder icon, label, -- cgit v1.2.3 From 07fc011e209ab24069d06df961a000dc7d6de3cf Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 2 Jun 2023 21:24:15 +0300 Subject: SL-19796 Creating folders in list mode does not scroll to new folder --- indra/llui/llfolderview.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 70c2a79d25..19855c9c76 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -695,12 +695,20 @@ void LLFolderView::draw() } } - if (mRenameItem && mRenamer && mRenamer->getVisible() && !getVisibleRect().overlaps(mRenamer->getRect())) - { - // renamer is not connected to the item we are renaming in any form so manage it manually - // TODO: consider stopping on any scroll action instead of when out of visible area - finishRenamingItem(); - } + if (mRenameItem + && mRenamer + && mRenamer->getVisible() + ) + { + LLRect renamer_rect; + localRectToOtherView(mRenamer->getRect(), &renamer_rect, mScrollContainer); + if (!mScrollContainer->getRect().overlaps(renamer_rect)) + { + // renamer is not connected to the item we are renaming in any form so manage it manually + // TODO: consider stopping on any scroll action instead of when out of visible area + finishRenamingItem(); + } + } // skip over LLFolderViewFolder::draw since we don't want the folder icon, label, // and arrow for the root folder -- cgit v1.2.3 From 417dbeb68ef842a8eee22ebab35c89ddee653619 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 10 Jun 2023 01:33:43 +0300 Subject: SL-19823 Edit not always active #5 --- indra/llui/llfolderview.cpp | 46 +++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 19855c9c76..8660048058 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -695,19 +695,14 @@ void LLFolderView::draw() } } - if (mRenameItem + if (mRenameItem && mRenamer && mRenamer->getVisible() - ) - { - LLRect renamer_rect; - localRectToOtherView(mRenamer->getRect(), &renamer_rect, mScrollContainer); - if (!mScrollContainer->getRect().overlaps(renamer_rect)) - { - // renamer is not connected to the item we are renaming in any form so manage it manually - // TODO: consider stopping on any scroll action instead of when out of visible area - finishRenamingItem(); - } + && !getVisibleRect().overlaps(mRenamer->getRect())) + { + // renamer is not connected to the item we are renaming in any form so manage it manually + // TODO: consider stopping on any scroll action instead of when out of visible area + finishRenamingItem(); } // skip over LLFolderViewFolder::draw since we don't want the folder icon, label, @@ -1851,13 +1846,28 @@ void LLFolderView::update() } } - if (mSignalSelectCallback) - { - //RN: we use keyboard focus as a proxy for user-explicit actions - BOOL take_keyboard_focus = (mSignalSelectCallback == SIGNAL_KEYBOARD_FOCUS); - mSelectSignal(mSelectedItems, take_keyboard_focus); - } - mSignalSelectCallback = FALSE; + if (mSelectedItems.size()) + { + LLFolderViewItem* item = mSelectedItems.back(); + // If the goal is to show renamer, don't callback untill + // item is visible or is no longer being scrolled to. + // Otherwise renamer will be instantly closed + // Todo: consider moving renamer out of selection callback + if (!mNeedsAutoRename || !mNeedsScroll || item->getVisible()) + { + if (mSignalSelectCallback) + { + //RN: we use keyboard focus as a proxy for user-explicit actions + BOOL take_keyboard_focus = (mSignalSelectCallback == SIGNAL_KEYBOARD_FOCUS); + mSelectSignal(mSelectedItems, take_keyboard_focus); + } + mSignalSelectCallback = FALSE; + } + } + else + { + mSignalSelectCallback = FALSE; + } } void LLFolderView::dumpSelectionInformation() -- cgit v1.2.3 From 929f9d8d5f2e7895016648557fa60c9d4a84baf6 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 12 Jun 2023 16:10:28 +0300 Subject: SL-19825 clear selection when right-clicking outside of selected items --- indra/llui/llfolderview.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 8660048058..7e5a9efb37 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1471,6 +1471,16 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) mCallbackRegistrar->popScope(); } } + + bool item_clicked = false; + for (selected_items_t::iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) + { + item_clicked |= (*item_it)->getRect().pointInRect(x, y); + } + if(!item_clicked && mSingleFolderMode) + { + clearSelection(); + } bool hide_folder_menu = mSuppressFolderMenu && isFolderSelected(); if (menu && (mSingleFolderMode || (handled && ( count > 0 && (hasVisibleChildren()) ))) && // show menu only if selected items are visible -- cgit v1.2.3 From 9eabffe430cd0c7b64f2cb796997dfd74a0cab82 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 12 Jun 2023 19:44:29 +0300 Subject: SL-19825 do not mix bool and BOOL types --- indra/llui/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 7e5a9efb37..fa5ff76a2e 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1472,7 +1472,7 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) } } - bool item_clicked = false; + BOOL item_clicked = FALSE; for (selected_items_t::iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { item_clicked |= (*item_it)->getRect().pointInRect(x, y); -- cgit v1.2.3 From 7f6ad82a2a76ed1f96bf1ca61cacc51151fe74bf Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 12 Jun 2023 23:19:02 +0300 Subject: SL-19823 Additional logging --- indra/llui/llfolderview.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index fa5ff76a2e..630d93cde0 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -702,6 +702,7 @@ void LLFolderView::draw() { // renamer is not connected to the item we are renaming in any form so manage it manually // TODO: consider stopping on any scroll action instead of when out of visible area + LL_DEBUGS("Inventory") << "Renamer out of bounds, hiding" << LL_ENDL; finishRenamingItem(); } @@ -1046,6 +1047,8 @@ void LLFolderView::paste() // public rename functionality - can only start the process void LLFolderView::startRenamingSelectedItem( void ) { + LL_DEBUGS("Inventory") << "Starting inventory renamer" << LL_ENDL; + // make sure selection is visible scrollToShowSelection(); -- cgit v1.2.3 From 46425b2e49377acc186e41c67a793f7f6b7f583b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 7 Sep 2023 01:35:37 +0300 Subject: SL-19826 Keep scroll from acting up if selection changed Unfulfilled scroll (due to fetching) persisted after selection changed --- indra/llui/llfolderview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 630d93cde0..650ae9ae75 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -611,6 +611,7 @@ void LLFolderView::clearSelection() } mSelectedItems.clear(); + mNeedsScroll = false; } std::set LLFolderView::getSelectionList() const -- cgit v1.2.3