EXT-7000 FIX "eat" TAB key while menu is active
Two problems:
1. AvatarList didn't hide popup menu when goes invisible.
2. (Real problem) MenuHolder View didn't process TAB key. Which leads to changing active ("focused") control. Which leads to the ability (for example) to switch tabs and hide popup menu parent view.
--HG--
branch : product-engine
master
parent
e462c90db6
commit
f9dff766a8
|
|
@ -3420,6 +3420,12 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
|||
|
||||
if (pMenu)
|
||||
{
|
||||
//eat TAB key - EXT-7000
|
||||
if (key == KEY_TAB && mask == MASK_NONE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//handle ESCAPE and RETURN key
|
||||
handled = LLPanel::handleKey(key, mask, called_from_parent);
|
||||
if (!handled)
|
||||
|
|
|
|||
|
|
@ -399,6 +399,15 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
return handled;
|
||||
}
|
||||
|
||||
void LLAvatarList::setVisible(BOOL visible)
|
||||
{
|
||||
if ( visible == FALSE && mContextMenu )
|
||||
{
|
||||
mContextMenu->hide();
|
||||
}
|
||||
LLFlatListViewEx::setVisible(visible);
|
||||
}
|
||||
|
||||
void LLAvatarList::computeDifference(
|
||||
const uuid_vec_t& vnew_unsorted,
|
||||
uuid_vec_t& vadded,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ public:
|
|||
|
||||
virtual void clear();
|
||||
|
||||
virtual void setVisible(BOOL visible);
|
||||
|
||||
void setNameFilter(const std::string& filter);
|
||||
void setDirty(bool val = true, bool force_refresh = false);
|
||||
uuid_vec_t& getIDs() { return mIDs; }
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ public:
|
|||
{
|
||||
public:
|
||||
virtual void show(LLView* spawning_view, const uuid_vec_t& selected_uuids, S32 x, S32 y) = 0;
|
||||
virtual void hide() = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue