Allow non-grid-wide experiences in the parcel block list to block estate allowed

experiences.
master
dolphin 2014-09-05 10:58:39 -07:00
parent 51e65a4b52
commit e7645eb995
3 changed files with 8 additions and 4 deletions

View File

@ -2958,10 +2958,8 @@ BOOL LLPanelLandExperiences::postBuild()
// only non-grid-wide experiences
mAllowed->addFilter(boost::bind(LLPanelExperiencePicker::FilterWithProperty, _1, LLExperienceCache::PROPERTY_GRID));
// only grid-wide experiences
mBlocked->addFilter(boost::bind(LLPanelExperiencePicker::FilterWithoutProperty, _1, LLExperienceCache::PROPERTY_GRID));
// but not privileged ones
mBlocked->addFilter(boost::bind(LLPanelExperiencePicker::FilterWithProperty, _1, LLExperienceCache::PROPERTY_PRIVILEGED));
// no privileged ones
mBlocked->addFilter(boost::bind(LLPanelExperiencePicker::FilterWithProperties, _1, LLExperienceCache::PROPERTY_PRIVILEGED|LLExperienceCache::PROPERTY_GRID));
getChild<LLLayoutPanel>("trusted_layout_panel")->setVisible(FALSE);
getChild<LLTextBox>("experiences_help_text")->setVisible(FALSE);

View File

@ -407,6 +407,11 @@ bool LLPanelExperiencePicker::FilterWithProperty( const LLSD& experience, S32 pr
return (experience[LLExperienceCache::PROPERTIES].asInteger() & prop) != 0;
}
bool LLPanelExperiencePicker::FilterWithProperties( const LLSD& experience, S32 prop)
{
return ! ((experience[LLExperienceCache::PROPERTIES].asInteger() & prop) == prop);
}
bool LLPanelExperiencePicker::FilterWithoutProperty( const LLSD& experience, S32 prop )
{
return (experience[LLExperienceCache::PROPERTIES].asInteger() & prop) == 0;

View File

@ -55,6 +55,7 @@ public:
void setDefaultFilters();
static bool FilterWithProperty(const LLSD& experience, S32 prop);
static bool FilterWithProperties(const LLSD& experience, S32 prop);
static bool FilterWithoutProperty(const LLSD& experience, S32 prop);
static bool FilterMatching(const LLSD& experience, const LLUUID& id);
bool FilterOverRating(const LLSD& experience);