diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2010-10-14 12:34:28 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2010-10-14 12:34:28 +0300 |
commit | 46596485982768844c9d373c2ddca3d678a24e2c (patch) | |
tree | 9f072a7adc7a534e5d08a66d9335ebfa20a170de /indra/llui | |
parent | 6589c200199e1fe0d0bf5f610d990ae197108981 (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/llui')
-rw-r--r-- | indra/llui/llmenubutton.cpp | 32 | ||||
-rw-r--r-- | indra/llui/llmenubutton.h | 11 |
2 files changed, 4 insertions, 39 deletions
diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index 0930eb95dd..3df05f4d3f 100644 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -57,8 +57,6 @@ LLMenuButton::LLMenuButton(const LLMenuButton::Params& p) llwarns << "Error loading menu_button menu" << llendl; } } - - setMenuPosition(); } void LLMenuButton::toggleMenu() @@ -72,34 +70,12 @@ void LLMenuButton::toggleMenu() } else { - //mMenu->needsArrange(); //so it recalculates the visible elements - LLMenuGL::showPopup(getParent(), mMenu, mX, mY); + LLRect rect = getRect(); + //mMenu->needsArrange(); //so it recalculates the visible elements + LLMenuGL::showPopup(getParent(), mMenu, rect.mLeft, rect.mBottom); } } -void LLMenuButton::setMenuPosition(EMenuPosition position /*ON_BOTTOM_LEFT*/) -{ - if (!mMenu) - return; - - LLRect rect = getRect(); - - switch (position) - { - case ON_TOP_LEFT: - { - mX = rect.mLeft; - mY = rect.mTop + mMenu->getRect().getHeight(); - break; - } - case ON_BOTTOM_LEFT: - { - mX = rect.mLeft; - mY = rect.mBottom; - break; - } - } -} void LLMenuButton::hideMenu() { @@ -133,8 +109,6 @@ BOOL LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask) setFocus(TRUE); } - LLUICtrl::handleMouseDown(x, y, mask); - toggleMenu(); if (getSoundFlags() & MOUSE_DOWN) diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index 273af2413e..81ca0e047c 100644 --- a/indra/llui/llmenubutton.h +++ b/indra/llui/llmenubutton.h @@ -42,22 +42,14 @@ public: Optional<std::string> menu_filename; Params(); - }; - - enum EMenuPosition - { - ON_TOP_LEFT, - ON_BOTTOM_LEFT - }; + }; void toggleMenu(); - void setMenuPosition(EMenuPosition position = ON_BOTTOM_LEFT); /*virtual*/ void draw(); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); void hideMenu(); LLMenuGL* getMenu() { return mMenu; } - void setMenu(LLMenuGL* menu) { mMenu = menu; } protected: friend class LLUICtrlFactory; @@ -66,7 +58,6 @@ protected: private: LLMenuGL* mMenu; bool mMenuVisibleLastFrame; - S32 mX, mY; }; |