FIRE-12551: Enable group access by default again if public access is removed so we don't get surprised and unintentionally banned from the land!

Ansariel 2014-02-06 13:01:15 +01:00
parent 56da899bb5
commit 75866dd6a6
1 changed files with 13 additions and 0 deletions

View File

@ -2822,6 +2822,19 @@ void LLPanelLandAccess::onCommitPublicAccess(LLUICtrl *ctrl, void *userdata)
return;
}
// <FS:Ansariel> FIRE-12551: Enable group access by default if public access is removed
// or we might end up banning ourself from the land!
bool public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
if (!public_access)
{
std::string group_name;
if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
{
self->getChild<LLUICtrl>("GroupCheck")->setValue(public_access ? FALSE : TRUE);
}
}
// </FS:Ansariel>
onCommitAny(ctrl, userdata);
}