diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-12 14:12:54 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-12 14:12:54 +0100 |
commit | b619184d418bec1cdd2f4e0820ebbb05a7e19a02 (patch) | |
tree | fbea58668b96a054e275a6075c3b2dd2d41a2003 /indra | |
parent | 6022f625861907cf08e89d754fb325beed7f9a13 (diff) |
EXT-8589 FIXED Nothing happens if choose 'Invite to Group' from avatar's 3D context menu
The groups-chooser was auto-closing when the IW selection was lost, which in the case of right-clicking on (other) avatars is immediately. The 'hg blame' is lost in merge-fubarism so I can't track why this behaviour was ever introduced, but I can think or (or find) no reason to autoclose in this case - the groups picker dialog doesn't even use the current selection, let alone care if it's lost.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatergroups.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 0bd8215e5c..307c937f6e 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -47,7 +47,6 @@ #include "llbutton.h" #include "llgroupactions.h" #include "llscrolllistctrl.h" -#include "llselectmgr.h" #include "lltextbox.h" #include "lluictrlfactory.h" #include "lltrans.h" @@ -90,15 +89,13 @@ BOOL LLFloaterGroupPicker::postBuild() list_ctrl->setContextMenu(LLScrollListCtrl::MENU_GROUP); } - LLSelectMgr::getInstance()->mUpdateSignal.connect(boost::bind(&LLFloaterGroupPicker::onBtnCancel, this)); - childSetAction("OK", onBtnOK, this); childSetAction("Cancel", onBtnCancel, this); setDefaultBtn("OK"); - getChildView("OK")->setEnabled(TRUE); + childEnable("OK"); return TRUE; } @@ -179,8 +176,8 @@ void LLPanelGroups::reset() { group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } - getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); - getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",MAX_AGENT_GROUPS)); + childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); + childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); enableButtons(); @@ -190,8 +187,8 @@ BOOL LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); - getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); - getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",MAX_AGENT_GROUPS)); + childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); + childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list"); if (list) @@ -231,25 +228,25 @@ void LLPanelGroups::enableButtons() if(group_id != gAgent.getGroupID()) { - getChildView("Activate")->setEnabled(TRUE); + childEnable("Activate"); } else { - getChildView("Activate")->setEnabled(FALSE); + childDisable("Activate"); } if (group_id.notNull()) { - getChildView("Info")->setEnabled(TRUE); - getChildView("IM")->setEnabled(TRUE); - getChildView("Leave")->setEnabled(TRUE); + childEnable("Info"); + childEnable("IM"); + childEnable("Leave"); } else { - getChildView("Info")->setEnabled(FALSE); - getChildView("IM")->setEnabled(FALSE); - getChildView("Leave")->setEnabled(FALSE); + childDisable("Info"); + childDisable("IM"); + childDisable("Leave"); } - getChildView("Create")->setEnabled(gAgent.canJoinGroups()); + childSetEnabled("Create", gAgent.canJoinGroups()); } |