diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 2897f7a356..b0cc89b960 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -220,7 +220,7 @@ void LLGroupActions::leave(const LLUUID& group_id) { // if (group_id.isNull()) // return; -// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f +// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f if ( (group_id.isNull()) || ((gAgent.getGroupID() == group_id) && (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP))) ) return; // [/RLVa:KB] @@ -245,7 +245,7 @@ void LLGroupActions::leave(const LLUUID& group_id) // static void LLGroupActions::activate(const LLUUID& group_id) { -// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f +// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f if (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)) return; // [/RLVa:KB] diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 630f6328de..45d4931513 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -268,11 +268,11 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata) // each group including "none" can be activated // if (userdata.asString() == "activate") // return gAgent.getGroupID() != selected_group_id; -// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f +// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f if (userdata.asString() == "activate") return (gAgent.getGroupID() != selected_group_id) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)); else if (userdata.asString() == "leave") - return (gAgent.getGroupID() != selected_group_id) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)); + return (real_group_selected) && ((gAgent.getGroupID() != selected_group_id) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP))); // [/RLVa:KB] if (userdata.asString() == "call") diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1fb920ebdf..eb10c573ab 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -883,7 +883,7 @@ void LLPanelPeople::updateButtons() LLPanel* groups_panel = mTabContainer->getCurrentPanel(); // groups_panel->getChildView("activate_btn")->setEnabled(item_selected && !cur_group_active); // "none" or a non-active group selected -// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f +// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f groups_panel->getChildView("activate_btn")->setEnabled( item_selected && !cur_group_active && !gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)); // "none" or a non-active group selected // [/RLVa:KB] diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index bf77e775a4..2db61839de 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -407,7 +407,7 @@ ERlvCmdRet RlvHandler::processClearCommand(const RlvCommand& rlvCmd) // Externally invoked event handlers // -// Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b +// Checked: 2011-05-22 (RLVa-1.4.1a) | Added: RLVa-1.3.1b bool RlvHandler::handleEvent(LLPointer event, const LLSD& sdUserdata) { // If the user managed to change their active group (= newly joined or created group) we need to reactivate the previous one @@ -1243,7 +1243,7 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd) RlvBehaviourNotifyHandler::getInstance()->removeNotify(rlvCmd.getObjectID(), nChannel, strFilter); } break; - case RLV_BHVR_SETGROUP: // @setgroup=n|y - Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b + case RLV_BHVR_SETGROUP: // @setgroup=n|y - Checked: 2011-05-22 (RLVa-1.4.1a) | Added: RLVa-1.3.1b { VERIFY_OPTION_REF(strOption.empty()); @@ -1609,7 +1609,7 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const eRet = onForceRemOutfit(rlvCmd); } break; - case RLV_BHVR_SETGROUP: // @setgroup:=force - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f + case RLV_BHVR_SETGROUP: // @setgroup:=force - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f eRet = onForceGroup(rlvCmd); break; case RLV_BHVR_UNSIT: // @unsit=force - Checked: 2010-03-18 (RLVa-1.2.0c) | Modified: RLVa-0.2.0g @@ -1746,18 +1746,15 @@ ERlvCmdRet RlvHandler::onForceRemOutfit(const RlvCommand& rlvCmd) const return RLV_RET_SUCCESS; } -// Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f +// Checked: 2011-07-23 (RLVa-1.4.1a) | Modified: RLVa-1.4.1a ERlvCmdRet RlvHandler::onForceGroup(const RlvCommand& rlvCmd) const { - RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption()); - LLUUID idGroup; bool fValid = false; - if (rlvCmdOption.isUUID()) + if (idGroup.set(rlvCmd.getOption())) { - idGroup = rlvCmdOption.getUUID(); fValid = (idGroup.isNull()) || (gAgent.isInGroup(idGroup, true)); } - else if (rlvCmdOption.isString()) + else { for (S32 idxGroup = 0, cntGroup = gAgent.mGroups.count(); (idxGroup < cntGroup) && (idGroup.isNull()); idxGroup++) if (boost::iequals(gAgent.mGroups.get(idxGroup).mName, rlvCmd.getOption())) @@ -1894,7 +1891,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const case RLV_BHVR_GETINVWORN: // @getinvworn[:]= eRet = onGetInvWorn(rlvCmd, strReply); break; - case RLV_BHVR_GETGROUP: // @getgroup= - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f + case RLV_BHVR_GETGROUP: // @getgroup= - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f strReply = (gAgent.getGroupID().notNull()) ? gAgent.getGroupName() : "none"; break; case RLV_BHVR_GETSITID: // @getsitid= - Checked: 2010-03-09 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a