MAINT-3496 FIXED Disable "Allow group access" option if "Sell passes to: group" is selected(and vice versa).
This commit is contained in:
@@ -2397,7 +2397,7 @@ BOOL LLPanelLandAccess::postBuild()
|
||||
childSetCommitCallback("public_access", onCommitPublicAccess, this);
|
||||
childSetCommitCallback("limit_payment", onCommitAny, this);
|
||||
childSetCommitCallback("limit_age_verified", onCommitAny, this);
|
||||
childSetCommitCallback("GroupCheck", onCommitAny, this);
|
||||
childSetCommitCallback("GroupCheck", onCommitGroupCheck, this);
|
||||
childSetCommitCallback("PassCheck", onCommitAny, this);
|
||||
childSetCommitCallback("pass_combo", onCommitAny, this);
|
||||
childSetCommitCallback("PriceSpin", onCommitAny, this);
|
||||
@@ -2562,11 +2562,11 @@ void LLPanelLandAccess::refresh()
|
||||
}
|
||||
|
||||
BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST);
|
||||
getChild<LLUICtrl>("PassCheck")->setValue(use_pass );
|
||||
getChild<LLUICtrl>("PassCheck")->setValue(use_pass);
|
||||
LLCtrlSelectionInterface* passcombo = childGetSelectionInterface("pass_combo");
|
||||
if (passcombo)
|
||||
{
|
||||
if (public_access || !use_pass || !use_group)
|
||||
if (public_access || !use_pass)
|
||||
{
|
||||
passcombo->selectByValue("anyone");
|
||||
}
|
||||
@@ -2661,12 +2661,11 @@ void LLPanelLandAccess::refresh_ui()
|
||||
{
|
||||
getChildView("GroupCheck")->setEnabled(can_manage_allowed);
|
||||
}
|
||||
BOOL group_access = getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
|
||||
BOOL sell_passes = getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
|
||||
getChildView("PassCheck")->setEnabled(can_manage_allowed);
|
||||
if (sell_passes)
|
||||
{
|
||||
getChildView("pass_combo")->setEnabled(group_access && can_manage_allowed);
|
||||
getChildView("pass_combo")->setEnabled(can_manage_allowed);
|
||||
getChildView("PriceSpin")->setEnabled(can_manage_allowed);
|
||||
getChildView("HoursSpin")->setEnabled(can_manage_allowed);
|
||||
}
|
||||
@@ -2731,6 +2730,32 @@ void LLPanelLandAccess::onCommitPublicAccess(LLUICtrl *ctrl, void *userdata)
|
||||
onCommitAny(ctrl, userdata);
|
||||
}
|
||||
|
||||
void LLPanelLandAccess::onCommitGroupCheck(LLUICtrl *ctrl, void *userdata)
|
||||
{
|
||||
LLPanelLandAccess *self = (LLPanelLandAccess *)userdata;
|
||||
LLParcel* parcel = self->mParcel->getParcel();
|
||||
if (!parcel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL use_pass_list = !self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
|
||||
BOOL use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
|
||||
LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
|
||||
if (passcombo)
|
||||
{
|
||||
if (use_access_group && use_pass_list)
|
||||
{
|
||||
if (passcombo->getSelectedValue().asString() == "group")
|
||||
{
|
||||
passcombo->selectByValue("anyone");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onCommitAny(ctrl, userdata);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
||||
{
|
||||
@@ -2769,14 +2794,14 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
||||
{
|
||||
use_access_list = TRUE;
|
||||
use_pass_list = self->getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
|
||||
if (use_access_group && use_pass_list)
|
||||
LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
|
||||
if (passcombo)
|
||||
{
|
||||
LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
|
||||
if (passcombo)
|
||||
if (use_access_group && use_pass_list)
|
||||
{
|
||||
if (passcombo->getSelectedValue().asString() == "group")
|
||||
{
|
||||
use_access_list = FALSE;
|
||||
use_access_group = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +160,7 @@ public:
|
||||
static void onClickBuyPass(void* deselect_when_done);
|
||||
static BOOL enableBuyPass(void*);
|
||||
static void onCommitAny(LLUICtrl* ctrl, void *userdata);
|
||||
static void onCommitGroupCheck(LLUICtrl* ctrl, void *userdata);
|
||||
static void finalizeCommit(void * userdata);
|
||||
static void onForSaleChange(LLUICtrl *ctrl, void * userdata);
|
||||
static void finalizeSetSellChange(void * userdata);
|
||||
|
||||
Reference in New Issue
Block a user