summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2013-06-17 20:14:56 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2013-06-17 20:14:56 +0300
commitf29fab5f73fc6dc0eefd0a623c69640abdcba3e8 (patch)
tree270abee1618da84307e7814715eb4379863e391c /indra/newview/llfavoritesbar.cpp
parent636a0f002db89b8001aeb1982f860ea1eda7dabb (diff)
CHUI-506 FIXED Don't change dropdown position if items are unchanged.
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rwxr-xr-xindra/newview/llfavoritesbar.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 6d90667194..b35ef3a961 100755
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -400,6 +400,8 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
mMoreTextBox->setClickedCallback(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this));
addChild(mMoreTextBox);
+ mDropDownItemsCount = 0;
+
LLTextBox::Params label_param(p.label);
mBarLabel = LLUICtrlFactory::create<LLTextBox> (label_param);
addChild(mBarLabel);
@@ -820,11 +822,13 @@ void LLFavoritesBarCtrl::updateButtons()
}
// Update overflow menu
LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mOverflowMenuHandle.get());
- if (overflow_menu && overflow_menu->getVisible())
+ if (overflow_menu && overflow_menu->getVisible() && (overflow_menu->getItemCount() != mDropDownItemsCount))
{
overflow_menu->setVisible(FALSE);
if (mUpdateDropDownItems)
+ {
showDropDownMenu();
+ }
}
}
else
@@ -940,6 +944,7 @@ void LLFavoritesBarCtrl::showDropDownMenu()
menu->updateParent(LLMenuGL::sMenuContainer);
menu->setButtonRect(mMoreTextBox->getRect(), this);
positionAndShowMenu(menu);
+ mDropDownItemsCount = menu->getItemCount();
}
}