summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpermissions.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-10-12 11:55:27 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-10-12 11:55:27 +0300
commit1b19919eff1104f9f1ee97004420e91c45349e29 (patch)
treea0b7c8b06bf198f1a138c181d086d8c26d11ad72 /indra/newview/llpanelpermissions.cpp
parent86bf599e2895b60c04fb688b9ad118c83e075be3 (diff)
parent18f23d9a559d3b5ed61d4fc4d3cfa9fa6c50689c (diff)
Merge commit '18f23d9a55' into marchcat/c-develop
# Conflicts: # indra/llwindow/llwindowwin32.cpp # indra/newview/llagent.cpp # indra/newview/llavatarrenderinfoaccountant.cpp # indra/newview/llcontrolavatar.cpp # indra/newview/llinspecttexture.cpp # indra/newview/llviewertexture.cpp # indra/newview/llviewerwindow.cpp # indra/newview/llvoavatar.cpp # indra/newview/llvoavatar.h # indra/newview/llvoavatarself.cpp # indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/newview/llpanelpermissions.cpp')
-rw-r--r--indra/newview/llpanelpermissions.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 0ce1f0f9d3..891896076a 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -176,7 +176,7 @@ bool LLPanelPermissions::postBuild()
childSetCommitCallback("sale type",LLPanelPermissions::onCommitSaleType,this);
- childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSaleInfo, this);
+ childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSalePrice, this);
childSetCommitCallback("checkbox next owner can modify",LLPanelPermissions::onCommitNextOwnerModify,this);
childSetCommitCallback("checkbox next owner can copy",LLPanelPermissions::onCommitNextOwnerCopy,this);
@@ -781,7 +781,9 @@ void LLPanelPermissions::refresh()
if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))
{
- getChildView("checkbox for sale")->setEnabled(can_transfer || (!can_transfer && num_for_sale));
+ bool change_sale_allowed = can_transfer || (!can_transfer && num_for_sale);
+ getChildView("checkbox for sale")->setEnabled(change_sale_allowed);
+ getChildView("Edit Cost")->setEnabled(change_sale_allowed && !is_for_sale_mixed);
// Set the checkbox to tentative if the prices of each object selected
// are not the same.
getChild<LLUICtrl>("checkbox for sale")->setTentative( is_for_sale_mixed);
@@ -1223,6 +1225,16 @@ void LLPanelPermissions::onCommitSaleType(LLUICtrl*, void* data)
self->setAllSaleInfo();
}
+void LLPanelPermissions::onCommitSalePrice(LLUICtrl *, void *data)
+{
+ LLPanelPermissions *self = (LLPanelPermissions *) data;
+ LLCheckBoxCtrl *checkPurchase = self->getChild<LLCheckBoxCtrl>("checkbox for sale");
+ if (checkPurchase && checkPurchase->get())
+ {
+ self->setAllSaleInfo();
+ }
+}
+
void LLPanelPermissions::setAllSaleInfo()
{
LL_INFOS() << "LLPanelPermissions::setAllSaleInfo()" << LL_ENDL;