Reapply FS-specific changes

Kitty Barnett 2016-06-24 17:18:38 +02:00
parent a21ad8481e
commit 17a9b09f25
12 changed files with 119 additions and 41 deletions

View File

@ -394,7 +394,7 @@ void LLAvatarList::refresh()
// <FS:Ansariel> FIRE-12750: Name filter not working correctly
//if (!have_filter || findInsensitive(av_name.getDisplayName(), mNameFilter))
if (!have_filter || findInsensitive(getNameForDisplay(av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
if (!have_filter || findInsensitive(getNameForDisplay(buddy_id, av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
// </FS:Ansariel>
{
if (nadded >= ADD_LIMIT)
@ -450,7 +450,7 @@ void LLAvatarList::refresh()
have_names &= LLAvatarNameCache::get(buddy_id, &av_name);
// <FS:Ansariel> FIRE-12750: Name filter not working correctly
//if (!findInsensitive(av_name.getDisplayName(), mNameFilter))
if (!findInsensitive(getNameForDisplay(av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
if (!findInsensitive(getNameForDisplay(buddy_id, av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
// </FS:Ansariel>
{
removeItemByUUID(buddy_id);
@ -526,7 +526,7 @@ bool LLAvatarList::filterHasMatches()
// <FS:Ansariel> FIRE-12750: Name filter not working correctly
//if (have_name && !findInsensitive(av_name.getDisplayName(), mNameFilter))
if (have_name && !findInsensitive(getNameForDisplay(av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
if (have_name && !findInsensitive(getNameForDisplay(buddy_id, av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
// </FS:Ansariel>
{
continue;
@ -742,20 +742,20 @@ void LLAvatarList::onItemDoubleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
// <FS:Ansariel> FIRE-12750: Name filter not working correctly
// static
std::string LLAvatarList::getNameForDisplay(const LLAvatarName& av_name, bool show_displayname, bool show_username, bool rlv_check_shownames)
std::string LLAvatarList::getNameForDisplay(const LLUUID& avatar_id, const LLAvatarName& av_name, bool show_displayname, bool show_username, bool rlv_check_shownames)
{
bool fRlvFilter = (rlv_check_shownames) && (RlvActions::hasBehaviour(RLV_BHVR_SHOWNAMES));
bool fRlvCanShowName = (!rlv_check_shownames) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar_id));
if (show_displayname && !show_username)
{
return ( (!fRlvFilter) ? av_name.getDisplayName() : RlvStrings::getAnonym(av_name) );
return ( (fRlvCanShowName) ? av_name.getDisplayName() : RlvStrings::getAnonym(av_name) );
}
else if (!show_displayname && show_username)
{
return ( (!fRlvFilter) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
return ( (fRlvCanShowName) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
}
else
else
{
return ( (!fRlvFilter) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );
return ( (fRlvCanShowName) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );
}
}
// </FS:Ansariel>

View File

@ -113,7 +113,7 @@ public:
// [/FS:CR]
// <FS:Ansariel> FIRE-12750: Name filter not working correctly
static std::string getNameForDisplay(const LLAvatarName& av_name, bool show_displayname, bool show_username, bool rlv_check_shownames);
static std::string getNameForDisplay(const LLUUID& avatar_id, const LLAvatarName& av_name, bool show_displayname, bool show_username, bool rlv_check_shownames);
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);

View File

@ -591,10 +591,11 @@ void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
// setAvatarName( (fRlvCanShowName) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
//else
// setAvatarName( (fRlvCanShowName) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );
setAvatarName(LLAvatarList::getNameForDisplay(av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames));
setAvatarName(LLAvatarList::getNameForDisplay(mAvatarId, av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames));
// NOTE: If you change this, you will break sorting the contacts list
// by username unless you go change the comparator too. -- TS
// NOTE: If you change this, you will break sorting the contacts list
// by username unless you go change the comparator too. -- TS
setAvatarToolTip( (fRlvCanShowName) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
// TODO-RLVa: bit of a hack putting this here. Maybe find a better way?
mAvatarIcon->setDrawTooltip(fRlvCanShowName);
// [/RLVa:KB]

View File

@ -35,6 +35,8 @@
#include "rlvlocks.h"
#include "llscriptruntimeperms.h"
#include <boost/algorithm/string/predicate.hpp> // icontains
#include <boost/algorithm/string/regex.hpp> // regex_replace_all
#include <boost/algorithm/string.hpp>
// ============================================================================
@ -361,6 +363,12 @@ void RlvStrings::setCustomString(const std::string& strStringName, const std::st
bool RlvUtil::m_fForceTp = false;
std::string escape_for_regex(const std::string& str)
{
using namespace boost;
return regex_replace(str, regex("[.^$|()\\[\\]{}*+?\\\\]"), "\\\\&", match_default|format_sed);
}
// Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-1.0.0a
void RlvUtil::filterLocation(std::string& strUTF8Text)
{
@ -368,12 +376,12 @@ void RlvUtil::filterLocation(std::string& strUTF8Text)
LLWorld::region_list_t regions = LLWorld::getInstance()->getRegionList();
const std::string& strHiddenRegion = RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
for (LLWorld::region_list_t::const_iterator itRegion = regions.begin(); itRegion != regions.end(); ++itRegion)
boost::ireplace_all(strUTF8Text, (*itRegion)->getName(), strHiddenRegion);
boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + escape_for_regex((*itRegion)->getName()) + "\\b", boost::regex::icase), strHiddenRegion);
// Filter any mention of the parcel name
LLViewerParcelMgr* pParcelMgr = LLViewerParcelMgr::getInstance();
if (pParcelMgr)
boost::ireplace_all(strUTF8Text, pParcelMgr->getAgentParcelName(), RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL));
boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + escape_for_regex(pParcelMgr->getAgentParcelName()) + "\\b", boost::regex::icase), RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL));
}
// Checked: 2010-12-08 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c
@ -386,7 +394,7 @@ void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
LLAvatarName avName;
if ( (LLAvatarNameCache::get(idAgents[idxAgent], &avName)) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, idAgents[idxAgent])) )
{
const std::string& strDisplayName = avName.getDisplayName();
const std::string& strDisplayName = escape_for_regex(avName.getDisplayName());
bool fFilterDisplay = (strDisplayName.length() > 2);
const std::string& strLegacyName = avName.getLegacyName();
fFilterLegacy &= (strLegacyName.length() > 2);
@ -396,16 +404,16 @@ void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
if (boost::icontains(strLegacyName, strDisplayName))
{
if (fFilterLegacy)
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strLegacyName + "\\b", boost::regex::icase), strAnonym);
if (fFilterDisplay)
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strDisplayName + "\\b", boost::regex::icase), strAnonym);
}
else
{
if (fFilterDisplay)
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strDisplayName + "\\b", boost::regex::icase), strAnonym);
if (fFilterLegacy)
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strLegacyName + "\\b", boost::regex::icase), strAnonym);
}
}
}

View File

@ -19,6 +19,7 @@
#include "llavatarname.h"
#include "llselectmgr.h"
#include "lltrans.h"
#include "llviewercontrol.h"
#include "rlvdefines.h"
@ -164,7 +165,7 @@ public:
static void notifyBlocked(const std::string& strNotifcation, const LLSD& sdArgs = LLSD());
static void notifyBlockedGeneric() { notifyBlocked(RLV_STRING_BLOCKED_GENERIC); }
static void notifyBlockedViewXXX(LLAssetType::EType assetType) { notifyBlocked(RLV_STRING_BLOCKED_VIEWXXX, LLSD().with("[TYPE]", LLAssetType::lookup(assetType))); }
static void notifyBlockedViewXXX(LLAssetType::EType assetType) { notifyBlocked(RLV_STRING_BLOCKED_VIEWXXX, LLSD().with("[TYPE]", LLTrans::getString(LLAssetType::lookupHumanReadable(assetType)))); }
static void notifyFailedAssertion(const std::string& strAssert, const std::string& strFile, int nLine);
static void sendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession = LLUUID::null);

View File

@ -34,7 +34,7 @@ const S32 RLVa_VERSION_PATCH = 0;
const S32 RLVa_VERSION_BUILD = 0;
// Uncomment before a final release
//#define RLV_RELEASE
#define RLV_RELEASE
// Defining these makes it easier if we ever need to change our tag
#define RLV_WARNS LL_WARNS("RLV")

View File

@ -57,6 +57,12 @@
#include "rlvui.h"
#include "rlvextensions.h"
// <FS:Ansariel> [FS communication UI]
#include "fsfloatervoicecontrols.h"
// </FS:Ansariel> [FS communication UI]
#include "fslslbridge.h"
#include "fsradar.h"
// Boost includes
#include <boost/algorithm/string.hpp>
@ -1589,7 +1595,7 @@ void RlvBehaviourToggleHandler<RLV_BHVR_EDIT>::onCommandToggle(ERlvBehaviour eBh
// Hide the build floater if it's currently visible
if (LLFloaterReg::instanceVisible("build"))
LLToolMgr::instance().toggleBuildMode();
LLToolMgr::instance().toggleBuildMode("toggleonly");
}
// Start or stop filtering opening the beacons floater
@ -1907,6 +1913,10 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SHOWINV>::onCommandToggle(ERlvBehaviour
LLFloaterReg::const_instance_list_t invFloaters = LLFloaterReg::getFloaterList("inventory");
for (LLFloater* pFloater : invFloaters)
pFloater->closeFloater();
LLFloaterReg::const_instance_list_t lSecFloaters = LLFloaterReg::getFloaterList("secondary_inventory");
for (LLFloaterReg::const_instance_list_t::const_iterator itSecFloater = lSecFloaters.begin(); itSecFloater != lSecFloaters.end(); ++itSecFloater)
(*itSecFloater)->closeFloater();
}
//
@ -1941,10 +1951,17 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SHOWINV>::onCommandToggle(ERlvBehaviour
//
// Filter (or stop filtering) opening new inventory floaters
//
// <FS:Ansariel> Modified for FIRE-8804
if (fHasBhvr)
{
RlvUIEnabler::instance().addGenericFloaterFilter("inventory");
RlvUIEnabler::instance().addGenericFloaterFilter("secondary_inventory");
}
else
{
RlvUIEnabler::instance().removeGenericFloaterFilter("inventory");
RlvUIEnabler::instance().removeGenericFloaterFilter("secondary_inventory");
}
}
// Handles: @shownames[:<uuid>]=n|y toggles
@ -1958,14 +1975,23 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SHOWNAMES>::onCommandToggle(ERlvBehaviou
RlvActions::setShowName(RlvActions::SNC_DEFAULT, !fHasBhvr);
// Refresh the nearby people list
LLPanelPeople* pPeoplePanel = LLFloaterSidePanelContainer::getPanel<LLPanelPeople>("people", "panel_people");
RLV_ASSERT( (pPeoplePanel) && (pPeoplePanel->getNearbyList()) );
if ( (pPeoplePanel) && (pPeoplePanel->getNearbyList()) )
{
if (pPeoplePanel->getNearbyList()->isInVisibleChain())
pPeoplePanel->onCommit();
pPeoplePanel->getNearbyList()->updateAvatarNames();
}
// <FS:Ansariel> [Standalone radar]
//LLPanelPeople* pPeoplePanel = LLFloaterSidePanelContainer::getPanel<LLPanelPeople>("people", "panel_people");
//RLV_ASSERT( (pPeoplePanel) && (pPeoplePanel->getNearbyList()) );
//if ( (pPeoplePanel) && (pPeoplePanel->getNearbyList()) )
// pPeoplePanel->getNearbyList()->updateAvatarNames();
FSRadar* pRadar = FSRadar::getInstance();
RLV_ASSERT( (pRadar) );
if ( (pRadar) )
pRadar->updateNames();
// </FS:Ansariel> [Standalone radar]
// Refresh the speaker list
// <FS:Ansariel> [FS communication UI]
FSFloaterVoiceControls* pCallFloater = LLFloaterReg::findTypedInstance<FSFloaterVoiceControls>("fs_voice_controls");
if (pCallFloater)
pCallFloater->getAvatarCallerList()->updateAvatarNames();
// </FS:Ansariel> [FS communication UI]
// Force the use of the "display name" cache so we can filter both display and legacy names (or return back to the user's preference)
if (fHasBhvr)
@ -2084,7 +2110,7 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
{
F32 nValue = (rlvCmdOption.m_nPelvisToFoot - gAgentAvatarp->getPelvisToFoot()) * rlvCmdOption.m_nPelvisToFootDeltaMult;
nValue += rlvCmdOption.m_nPelvisToFootOffset;
if (gAgentAvatarp->getRegion()->avatarHoverHeightEnabled())
if (gAgentAvatarp->getRegion()->avatarHoverHeightEnabled() || !gAgentAvatarp->isUsingServerBakes())
{
LLVector3 avOffset(0.0, 0.0, llclamp<F32>(nValue, MIN_HOVER_Z, MAX_HOVER_Z));
gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ", avOffset.mV[VZ]);
@ -2687,7 +2713,9 @@ ERlvCmdRet RlvHandler::onGetAttach(const RlvCommand& rlvCmd, std::string& strRep
const LLViewerJointAttachment* pAttachPt = itAttach->second;
if ( (0 == idxAttachPt) || (itAttach->first == idxAttachPt) )
{
bool fWorn = (pAttachPt->getNumObjects() > 0) &&
// Ansa: Do not include the bridge when checking for number of objects
S32 bridge_correct = (pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME && FSLSLBridge::instance().isBridgeValid()) ? 1 : 0;
bool fWorn = ((pAttachPt->getNumObjects() - bridge_correct) > 0) &&
( (!RlvSettings::getHideLockedAttach()) || (RlvForceWear::isForceDetachable(pAttachPt, true, rlvCmd.getObjectID())) );
strReply.push_back( (fWorn) ? '1' : '0' );
}
@ -2716,7 +2744,11 @@ ERlvCmdRet RlvHandler::onGetAttachNames(const RlvCommand& rlvCmd, std::string& s
switch (rlvCmd.getBehaviourType())
{
case RLV_BHVR_GETATTACHNAMES: // Every attachment point that has an attached object
fAdd = (pAttachPt->getNumObjects() > 0);
// Ansa: Do not include the bridge when checking for number of objects
{
S32 bridge_correct = ((pAttachPt->getName() == FS_BRIDGE_ATTACHMENT_POINT_NAME && FSLSLBridge::instance().isBridgeValid()) ? 1 : 0);
fAdd = ((pAttachPt->getNumObjects() - bridge_correct) > 0);
}
break;
case RLV_BHVR_GETADDATTACHNAMES: // Every attachment point that can be attached to (wear replace OR wear add)
fAdd = (gRlvAttachmentLocks.canAttach(pAttachPt) & RLV_WEAR);

View File

@ -20,9 +20,9 @@
#include <stack>
#include "rlvcommon.h"
#if LL_GNUC
//#if LL_GNUC
#include "rlvhelper.h" // Needed to make GCC happy
#endif // LL_GNUC
//#endif // LL_GNUC
// ============================================================================

View File

@ -21,6 +21,10 @@
#include "llnotificationsutil.h"
#include "llviewerobjectlist.h"
//<FS:TS> FIRE-4453 bridge detached by the RLV command @remattach=force
#include "fslslbridge.h"
//</FS:TS> FIRE-4453
#include "rlvcommon.h"
#include "rlvhelper.h"
#include "rlvhandler.h"
@ -1132,6 +1136,9 @@ bool RlvForceWear::isForceDetachable(const LLViewerObject* pAttachObj, bool fChe
// - it's not "remove locked" by anything (or anything except the object specified by pExceptObj)
// - it's strippable
// - composite folders are disabled *or* it isn't part of a composite folder that has at least one item locked
//<FS:TS> FIRE-4453 bridge detached by the RLV command @remattach=force
// - it's not the LSL bridge, which should never be affected by RLV
//</FS:TS> FIRE-4453
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
LLViewerInventoryCategory* pFolder = NULL;
#endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS
@ -1141,6 +1148,9 @@ bool RlvForceWear::isForceDetachable(const LLViewerObject* pAttachObj, bool fChe
&& ( (idExcept.isNull()) ? (!gRlvAttachmentLocks.isLockedAttachment(pAttachObj))
: (!gRlvAttachmentLocks.isLockedAttachmentExcept(pAttachObj, idExcept)) )
&& (isStrippable(pAttachObj->getAttachmentItemID()))
//<FS:TS> FIRE-4453 bridge detached by the RLV command @remattach=force
&& (pAttachObj->getID() != FSLSLBridge::instance().getAttachedID())
//</FS:TS> FIRE-4453
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
&& ( (!fCheckComposite) || (!RlvSettings::getEnableComposites()) ||
(!gRlvHandler.getCompositeInfo(pAttachPt->getItemID(), NULL, &pFolder)) || (gRlvHandler.canTakeOffComposite(pFolder)) )

View File

@ -411,7 +411,7 @@ void RlvRenameOnWearObserver::doneIdle()
}
const LLViewerJointAttachment* pAttachPt = NULL; S32 idxAttachPt = 0;
RLV_ASSERT(mComplete.size() > 0); // Catch instances where we forgot to call startFetch()
//RLV_ASSERT(mComplete.size() > 0); // Catch instances where we forgot to call startFetch()
for (uuid_vec_t::const_iterator itItem = mComplete.begin(); itItem != mComplete.end(); ++itItem)
{
const LLUUID& idAttachItem = *itItem;

View File

@ -15,6 +15,7 @@
*/
#include "llviewerprecompiledheaders.h"
#include "fslslbridge.h"
#include "llagent.h"
#include "llappearancemgr.h"
#include "llattachmentsmgr.h"
@ -658,6 +659,13 @@ void RlvAttachmentLockWatchdog::onDetach(const LLViewerObject* pAttachObj, const
if ( (!idxAttachPt) || (idAttachItem.isNull()) )
return;
// <FS:Ansariel> Bridge can always be detached
if (FSLSLBridge::instance().canDetach(idAttachItem))
{
return;
}
// </FS:Ansariel>
// If it's an attachment that's pending force-detach then we don't want to do anything (even if it's currently "remove locked")
rlv_detach_map_t::iterator itDetach = std::find(m_PendingDetach.begin(), m_PendingDetach.end(), idAttachItem);
if (itDetach != m_PendingDetach.end())

View File

@ -195,15 +195,27 @@ void RlvUIEnabler::onToggleShowMinimap()
// Break/reestablish the visibility connection for the nearby people panel embedded minimap instance
LLPanel* pPeoplePanel = LLFloaterSidePanelContainer::getPanel("people", "panel_people");
LLPanel* pNetMapPanel = (pPeoplePanel) ? pPeoplePanel->findChild<LLPanel>("Net Map Panel", TRUE) : NULL;
LLPanel* pNetMapPanel = (pPeoplePanel) ? pPeoplePanel->getChild<LLPanel>("minimaplayout", TRUE) : NULL; //AO: firestorm specific
RLV_ASSERT( (pPeoplePanel) && (pNetMapPanel) );
if (pNetMapPanel)
{
pNetMapPanel->setMakeVisibleControlVariable( (fEnable) ? gSavedSettings.getControl("NearbyListShowMap").get() : NULL);
pNetMapPanel->setMakeVisibleControlVariable( (fEnable) ? gSavedSettings.getControl("ShowRadarMinimap").get() : NULL);
// Reestablishing the visiblity connection will show the panel if needed so we only need to take care of hiding it when needed
if ( (!fEnable) && (pNetMapPanel->getVisible()) )
pNetMapPanel->setVisible(false);
}
// Break/reestablish the visibility connection for the radar panel embedded minimap instance
LLFloater* pRadarFloater = LLFloaterReg::getInstance("fs_radar");
LLPanel* pRadarNetMapPanel = (pRadarFloater) ? pRadarFloater->getChild<LLPanel>("minimaplayout", TRUE) : NULL; //AO: firestorm specific
RLV_ASSERT( (pRadarFloater) && (pRadarNetMapPanel) );
if (pRadarNetMapPanel)
{
pRadarNetMapPanel->setMakeVisibleControlVariable( (fEnable) ? gSavedSettings.getControl("ShowRadarMinimap").get() : NULL);
// Reestablishing the visiblity connection will show the panel if needed so we only need to take care of hiding it when needed
if ( (!fEnable) && (pRadarNetMapPanel->getVisible()) )
pRadarNetMapPanel->setVisible(false);
}
}
// Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a
@ -415,7 +427,10 @@ bool RlvUIEnabler::canViewRegionProperties()
bool RlvUIEnabler::hasOpenIM(const LLUUID& idAgent)
{
LLUUID idSession = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, idAgent);
return (NULL != LLFloaterReg::findInstance("impanel", idSession));
// <FS:Ansariel> [FS communication UI]
//return (NULL != LLFloaterReg::findInstance("impanel", idSession));
return (NULL != LLFloaterReg::findInstance("fs_impanel", idSession));
// </FS:Ansariel> [FS communication UI]
}
// Checked: 2011-11-04 (RLVa-1.4.4a) | Modified: RLVa-1.4.4a
@ -432,7 +447,10 @@ bool RlvUIEnabler::hasOpenProfile(const LLUUID& idAgent)
// Checked: 2010-09-11 (RLVa-1.2.1d) | Added: RLVa-1.2.1d
bool RlvUIEnabler::isBuildEnabled()
{
return (gAgent.canEditParcel()) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)));
// <FS:Ansariel> FIRE-1432: Build button not properly updated
//return (gAgent.canEditParcel()) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)));
return (LLViewerParcelMgr::getInstance()->allowAgentBuild()) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)));
// </FS:Ansariel>
}
// ============================================================================