summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfolderview.cpp')
-rw-r--r--indra/llui/llfolderview.cpp20
1 files changed, 14 insertions, 6 deletions
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