summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderview.h
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-08-12 16:16:57 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-08-12 16:16:57 +0300
commit0355910ba5b0ed56aabcf290f940987ad5aec1b4 (patch)
tree05313ab46d3f989cb2c5ff030806a0617039badb /indra/newview/llfolderview.h
parentacab27b04e8fd649476d28abda4de2c2e390d274 (diff)
EXT-8473 FIXED Fixed renaming inventory items without hitting Enter.
Problem: The bug was caused by the fix of EXT-6682 that prematurely forgets the item being renamed (by resetting mRenameItem) whenever the renamer input field loses focus. That's why we couldn't actually finish renaming item. Fix: The code is quite messy, but I'll try to explain. There are three cases when we should hide the renamer: 1) ESC key is hit (just hide). 2) ENTER key is hit (rename, then hide). 3) renamer loses focus (rename, then hide). In the first two cases we manually remove the renamer from the popups list -- by calling gViewerWindow->removePopup(mRenamer). In the third case that's done automatically. So, in all cases the onRenamerLost() pop-up is called that hides the renamer and only *then* resets mRenameItem. Not only this approach fixes the bug -- I hope it's a bit more straightforward too. Reviewed by Seraph at https://codereview.productengine.com/secondlife/r/854/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llfolderview.h')
-rw-r--r--indra/newview/llfolderview.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index f5f229a602..31352d04bf 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -274,6 +274,7 @@ public:
void dumpSelectionInformation();
virtual S32 notify(const LLSD& info) ;
+ void setEnableScroll(bool enable_scroll) { mEnableScroll = enable_scroll; }
bool useLabelSuffix() { return mUseLabelSuffix; }
private:
@@ -283,7 +284,7 @@ protected:
LLScrollContainer* mScrollContainer; // NULL if this is not a child of a scroll container.
void commitRename( const LLSD& data );
- void onRenamerLost( LLFocusableElement* renamer);
+ void onRenamerLost();
void finishRenamingItem( void );
void closeRenamer( void );
@@ -293,8 +294,6 @@ protected:
BOOL addNoOptions(LLMenuGL* menu) const;
- void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response);
-
protected:
LLHandle<LLView> mPopupMenuHandle;
@@ -310,6 +309,7 @@ protected:
LLLineEditor* mRenamer;
BOOL mNeedsScroll;
+ bool mEnableScroll;
BOOL mPinningSelectedItem;
LLRect mScrollConstraintRect;
BOOL mNeedsAutoSelect;