From 46596485982768844c9d373c2ddca3d678a24e2c Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 14 Oct 2010 12:34:28 +0300 Subject: 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. --- indra/newview/llpaneloutfitedit.cpp | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index c625ba5a11..54b0805a6c 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -403,9 +403,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() mAddWearablesPanel(NULL), mFolderViewFilterCmbBox(NULL), mListViewFilterCmbBox(NULL), - mPlusBtn(NULL), - mWearablesGearMenuBtn(NULL), - mGearMenuBtn(NULL) + mPlusBtn(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -480,20 +478,13 @@ BOOL LLPanelOutfitEdit::postBuild() childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::saveListSelection, this), NULL); childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesListView, this), NULL); childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::saveListSelection, this), NULL); + childSetCommitCallback("wearables_gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); + childSetCommitCallback("gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); childSetCommitCallback("shop_btn_1", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); childSetCommitCallback("shop_btn_2", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this, _2)); - mWearablesGearMenuBtn = getChild("wearables_gear_menu_btn"); - mGearMenuBtn = getChild("gear_menu_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(...) for performance. - static_cast(mWearablesGearMenuBtn)->setMouseDownCallback(boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1)); - static_cast(mGearMenuBtn)->setMouseDownCallback(boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1)); - mCOFWearables = getChild("cof_wearables_list"); mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this)); @@ -1268,36 +1259,32 @@ void LLPanelOutfitEdit::resetAccordionState() void LLPanelOutfitEdit::onGearButtonClick(LLUICtrl* clicked_button) { LLMenuGL* menu = NULL; - LLMenuButton* btn = NULL; if (mAddWearablesPanel->getVisible()) { if (!mAddWearablesGearMenu) { mAddWearablesGearMenu = LLAddWearablesGearMenu::create(mWearableItemsList, mInventoryItemsPanel); - mWearablesGearMenuBtn->setMenu(mAddWearablesGearMenu); } menu = mAddWearablesGearMenu; - btn = mWearablesGearMenuBtn; } else { if (!mGearMenu) { mGearMenu = LLPanelOutfitEditGearMenu::create(); - mGearMenuBtn->setMenu(mGearMenu); } menu = mGearMenu; - btn = mGearMenuBtn; } - if (!menu || !btn) return; + if (!menu) return; + menu->arrangeAndClear(); // update menu height + S32 menu_y = menu->getRect().getHeight() + clicked_button->getRect().getHeight(); menu->buildDrawLabels(); - menu->arrangeAndClear(); - btn->setMenuPosition(LLMenuButton::ON_TOP_LEFT); + LLMenuGL::showPopup(clicked_button, menu, 0, menu_y); } void LLPanelOutfitEdit::onAddMoreButtonClicked() -- cgit v1.2.3