summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgrouproles.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-10-15 09:28:08 +0800
committerErik Kundiman <erik@megapahit.org>2026-10-15 09:28:08 +0800
commitbbe494697ab37919f10009af516c711a685ac98e (patch)
tree4de4ebbcaa9ed7490f9b6847687e423374500273 /indra/newview/llpanelgrouproles.cpp
parent99324218871346f772a02cf530fa92b1450f2e23 (diff)
parent345ceae3dbaaa82be7b594d01dc0efade91811a5 (diff)
Merge tag 'Second_Life_Release#345ceae3-26.5' into 26.526.5
Diffstat (limited to 'indra/newview/llpanelgrouproles.cpp')
-rw-r--r--indra/newview/llpanelgrouproles.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index b4adbe0819..5c8c5c85b2 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -53,6 +53,7 @@
#include "llviewerwindow.h"
#include "llfocusmgr.h"
#include "llviewercontrol.h"
+#include "llviewerregion.h"
#include "roles_constants.h"
@@ -541,6 +542,19 @@ bool LLPanelGroupSubTab::matchesActionSearchFilter(std::string action)
}
}
+// Powers the viewer knows about but the current region has not enabled
+// via SimulatorFeatures; these are hidden from the abilities lists.
+static U64 get_unsupported_powers()
+{
+ U64 unsupported = 0;
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region || !region->groupChatPostLinksEnabled())
+ {
+ unsupported |= GP_SESSION_POST_LINKS;
+ }
+ return unsupported;
+}
+
void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
U64 allowed_by_some,
U64 allowed_by_all,
@@ -582,8 +596,9 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
bool is_owner_role)
{
LL_DEBUGS() << "Building role list for: " << action_set->mActionSetData->mName << LL_ENDL;
+ U64 unsupported_powers = get_unsupported_powers();
// See if the allow mask matches anything in this category.
- if (show_all || (allowed_by_some & action_set->mActionSetData->mPowerBit))
+ if (show_all || (allowed_by_some & action_set->mActionSetData->mPowerBit & ~unsupported_powers))
{
// List all the actions in this category that at least some members have.
LLSD row;
@@ -619,6 +634,12 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
for ( ; ra_it != ra_end; ++ra_it)
{
+ // Skip abilities the current region doesn't support.
+ if (unsupported_powers & (*ra_it)->mPowerBit)
+ {
+ continue;
+ }
+
// See if anyone has these action.
if (!show_all && !(allowed_by_some & (*ra_it)->mPowerBit))
{