summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderview.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-24 22:51:02 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-25 02:18:50 +0300
commit572e8269bcd5320daa66f4074e927c79869bf7de (patch)
tree92c4bdbb5dd9280e3079243826bd952d9fec7cd9 /indra/llui/llfolderview.cpp
parent505c15cf47c04e45f4a68790b5c63237a7bfcc9b (diff)
SL-19604 Creating new folders in combination views does not highlight created item
Diffstat (limited to 'indra/llui/llfolderview.cpp')
-rw-r--r--indra/llui/llfolderview.cpp15
1 files changed, 11 insertions, 4 deletions
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,