summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelwearing.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2010-10-14 12:34:28 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2010-10-14 12:34:28 +0300
commit46596485982768844c9d373c2ddca3d678a24e2c (patch)
tree9f072a7adc7a534e5d08a66d9335ebfa20a170de /indra/newview/llpanelwearing.cpp
parent6589c200199e1fe0d0bf5f610d990ae197108981 (diff)
STORM-381 FIXED Restored ability to join/create group from People tab > My Groups.
Backing out changeset fe6c8e0a4a23 (which was made to fix STORM-263). We'll examine and fix the faulty changes.
Diffstat (limited to 'indra/newview/llpanelwearing.cpp')
-rw-r--r--indra/newview/llpanelwearing.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 1b46294c52..860470cd73 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -32,7 +32,6 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
-#include "llmenubutton.h"
#include "llsidetray.h"
#include "llviewermenu.h"
#include "llwearableitemslist.h"
@@ -68,13 +67,13 @@ public:
{
if (!mMenu) return;
- mMenu->arrangeAndClear();
mMenu->buildDrawLabels();
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);
}
- LLMenuGL* getMenu() { return mMenu; }
-
private:
void onTakeOff()
@@ -190,16 +189,6 @@ BOOL LLPanelWearing::postBuild()
mCOFItemsList = getChild<LLWearableItemsList>("cof_items_list");
mCOFItemsList->setRightMouseDownCallback(boost::bind(&LLPanelWearing::onWearableItemsListRightClick, this, _1, _2, _3));
- 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(&LLPanelWearing::showGearMenu, this, _1));
-
- menu_gear_btn->setMenu(mGearMenu->getMenu());
-
-
return TRUE;
}
@@ -268,14 +257,7 @@ bool LLPanelWearing::isActionEnabled(const LLSD& userdata)
void LLPanelWearing::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);
- }
}
boost::signals2::connection LLPanelWearing::setSelectionChangeCallback(commit_callback_t cb)