summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitslist.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2010-10-14 13:03:19 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2010-10-14 13:03:19 +0300
commit1bd19e8ffe99c4a2d0df8936bf01a63ebc05258f (patch)
treec4b72f9e062c79326117758bb66d13ab7a6f4018 /indra/newview/lloutfitslist.cpp
parentaae37202f1ed591f3c453c96e3774c4efb2608dc (diff)
parent46596485982768844c9d373c2ddca3d678a24e2c (diff)
merge
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
-rw-r--r--indra/newview/lloutfitslist.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index bd9536d931..c0f7fa4abf 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -38,7 +38,6 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "lllistcontextmenu.h"
-#include "llmenubutton.h"
#include "llnotificationsutil.h"
#include "lloutfitobserver.h"
#include "llsidetray.h"
@@ -100,8 +99,10 @@ public:
updateItemsVisibility();
mMenu->buildDrawLabels();
- mMenu->arrangeAndClear();
mMenu->updateParent(LLMenuGL::sMenuContainer);
+ S32 menu_x = 0;
+ S32 menu_y = spawning_view->getRect().getHeight() + mMenu->getRect().getHeight();
+ LLMenuGL::showPopup(spawning_view, mMenu, menu_x, menu_y);
}
void updateItemsVisibility()
@@ -114,8 +115,6 @@ public:
mMenu->arrangeAndClear(); // update menu height
}
- LLMenuGL* getMenu() { return mMenu; }
-
private:
const LLUUID& getSelectedOutfitID()
{
@@ -354,15 +353,6 @@ BOOL LLOutfitsList::postBuild()
mAccordion = getChild<LLAccordionCtrl>("outfits_accordion");
mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR);
- LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
-
- // LLMenuButton::handleMouseDownCallback calls signal LLUICtrl::mouse_signal_t, not LLButton::commit_signal_t.
- // That's why to set signal LLUICtrl::mouse_signal_t we need to upcast to LLUICtrl. Using static_cast instead
- // of getChild<LLUICtrl>(...) for performance.
- static_cast<LLUICtrl*>(menu_gear_btn)->setMouseDownCallback(boost::bind(&LLOutfitsList::showGearMenu, this, _1));
-
- menu_gear_btn->setMenu(mGearMenu->getMenu());
-
return TRUE;
}
@@ -705,14 +695,7 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata)
void LLOutfitsList::showGearMenu(LLView* spawning_view)
{
if (!mGearMenu) return;
-
mGearMenu->show(spawning_view);
-
- LLMenuButton* btn = dynamic_cast<LLMenuButton*>(spawning_view);
- if (btn)
- {
- btn->setMenuPosition(LLMenuButton::ON_TOP_LEFT);
- }
}
void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const