From d10a87d6fb8522e2d1168f3cbe0ec769de773358 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 9 Jun 2016 19:12:07 +0200 Subject: [PATCH] FIRE-14223: First-round fix for using mouse scroll while renaming an item moves line editor out of inventory floater: Finish renaming and accept changes when using the scroll wheel (identical behavior to clicking the up/down buttons and Windows Explorer) --- indra/llui/llfolderview.cpp | 12 ++++++++++++ indra/llui/llfolderview.h | 1 + 2 files changed, 13 insertions(+) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index ace2786d8e..a0b42fe2cf 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1375,6 +1375,18 @@ BOOL LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask ) return LLView::handleMouseDown( x, y, mask ); } +// FIRE-14223: Using mouse scroll while renaming an item moves line editor out of inventory floater +BOOL LLFolderView::handleScrollWheel(S32 x, S32 y, S32 clicks) +{ + if (mRenameItem) + { + finishRenamingItem(); + } + + return LLView::handleScrollWheel(x, y, clicks); +} +// + BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &search_string, BOOL backward) { // get first selected item diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 4789271933..8425b4f927 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -200,6 +200,7 @@ public: /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); // FIRE-14223: Using mouse scroll while renaming an item moves line editor out of inventory floater /*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type,