diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-07-29 23:00:33 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-07-30 00:26:12 +0300 |
| commit | 7764024215414a3529f664780811980a33bb127b (patch) | |
| tree | 436115baa94fa836e67e9553342df4ad39d5b9ee /indra/llui/llfolderview.cpp | |
| parent | 5a2cceda0ca7299f72e13bbdf99599d4358590cb (diff) | |
#6062 Fix dupplicate rename AIS requests
Diffstat (limited to 'indra/llui/llfolderview.cpp')
| -rw-r--r-- | indra/llui/llfolderview.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 758b4bb176..baab17830b 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -651,9 +651,11 @@ bool LLFolderView::startDrag() void LLFolderView::commitRename( const LLSD& data ) { + // Intentionally doesn't check mRenamer->getVisible(), + // since this can be called from 'focus lost' event. + // Ex: clicking inworld should commit the rename. finishRenamingItem(); arrange( NULL, NULL ); - } void LLFolderView::draw() @@ -727,13 +729,17 @@ void LLFolderView::draw() void LLFolderView::finishRenamingItem( void ) { - if(!mRenamer) + if (!mRenamer) { return; } if( mRenameItem ) { mRenameItem->rename( mRenamer->getText() ); + // Clear text to avoid duplicate renames. + // Ex: 'return' key will trigger rename from handleKeyHere + // and might trigger commitRename from focus lost event. + mRenamer->setText(LLStringUtil::null); } closeRenamer(); |
