summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Mutavchi <emutavchi@productengine.com>2010-02-05 17:09:22 +0200
committerEugene Mutavchi <emutavchi@productengine.com>2010-02-05 17:09:22 +0200
commit113ae58ef1774da61cf2766dec38bc5c3270ceaf (patch)
tree752be9e393c48ae64ccce792a3789c936c94278b
parent782cb6ee87f1180101fbcb5b6403871dea345fd0 (diff)
Fixed low bug EXT-4217( Favorites overflow list closes after making copy/paste/delete)
--HG-- branch : product-engine
-rw-r--r--indra/newview/llfavoritesbar.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 0f52b30567..1e8a739d78 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -298,6 +298,20 @@ public:
return TRUE;
}
+ void setVisible(BOOL b)
+ {
+ // Overflow menu shouldn't hide when it still has focus. See EXT-4217.
+ if (!b && hasFocus())
+ return;
+ LLToggleableMenu::setVisible(b);
+ setFocus(b);
+ }
+
+ void onFocusLost()
+ {
+ setVisible(FALSE);
+ }
+
protected:
LLFavoriteLandmarkToggleableMenu(const LLToggleableMenu::Params& p):
LLToggleableMenu(p)
@@ -777,6 +791,15 @@ void LLFavoritesBarCtrl::updateButtons()
mChevronButton->setRect(rect);
mChevronButton->setVisible(TRUE);
}
+ // Update overflow menu
+ LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mPopupMenuHandle.get());
+ if (overflow_menu && overflow_menu->getVisible())
+ {
+ overflow_menu->setFocus(FALSE);
+ overflow_menu->setVisible(FALSE);
+ if (mUpdateDropDownItems)
+ showDropDownMenu();
+ }
}
else
{
@@ -892,6 +915,8 @@ void LLFavoritesBarCtrl::showDropDownMenu()
if (menu)
{
+ // Release focus to allow changing of visibility.
+ menu->setFocus(FALSE);
if (!menu->toggleVisibility())
return;