Skip to content
Snippets Groups Projects
Commit 44adcdec authored by Vadim Savchuk's avatar Vadim Savchuk
Browse files

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
parent 5de5510f
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment