diff options
author | Cinder <cinder.roxley@phoenixviewer.com> | 2014-06-07 14:14:29 -0600 |
---|---|---|
committer | Cinder <cinder.roxley@phoenixviewer.com> | 2014-06-07 14:14:29 -0600 |
commit | 79e0e7d2980b28660716f43d0f0518a107117e83 (patch) | |
tree | a5d506aa55aa6970b46ff1e493b6d5f9cb410470 /indra/newview/llfloaterland.cpp | |
parent | e6b20328c2e25223359dede17357682b5b4e7ea1 (diff) | |
parent | 98720c3cec8f1ab4af5e66f9d9b7bb9c277b78f1 (diff) |
Merge upstream
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rwxr-xr-x | indra/newview/llfloaterland.cpp | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index e30bff1edf..7213064746 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2336,7 +2336,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); @@ -2501,11 +2501,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"); } @@ -2598,12 +2598,11 @@ void LLPanelLandAccess::refresh_ui() getChildView("limit_age_verified")->setEnabled(FALSE); - 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); } @@ -2662,6 +2661,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) { @@ -2699,14 +2724,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; } } } |