summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-02-03 13:56:39 +0800
committerangela <angela@lindenlab.com>2010-02-03 13:56:39 +0800
commit460ec67b97bc210c0a03483dd0b754e92fabe806 (patch)
tree90bd49da9c7e23e6b90ebf04b8fcc9847b4f414e /indra/newview/llfloaterland.cpp
parent1094fa28c618370af9a95cf823cbd9287c92dd24 (diff)
parent86923afd27d76734cf1274fa788928230c232a4d (diff)
resolve merge in llsidepanelinventory.cpp
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r--indra/newview/llfloaterland.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 0ad283d7c6..8cd63deebe 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -427,8 +427,26 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnBuyLand = getChild<LLButton>("Buy Land...");
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
- mBtnScriptLimits = getChild<LLButton>("Scripts...");
- mBtnScriptLimits->setClickedCallback(onClickScriptLimits, this);
+ // note: on region change this will not be re checked, should not matter on Agni as
+ // 99% of the time all regions will return the same caps. In case of an erroneous setting
+ // to enabled the floater will just throw an error when trying to get it's cap
+ std::string url = gAgent.getRegion()->getCapability("LandResources");
+ if (!url.empty())
+ {
+ mBtnScriptLimits = getChild<LLButton>("Scripts...");
+ if(mBtnScriptLimits)
+ {
+ mBtnScriptLimits->setClickedCallback(onClickScriptLimits, this);
+ }
+ }
+ else
+ {
+ mBtnScriptLimits = getChild<LLButton>("Scripts...");
+ if(mBtnScriptLimits)
+ {
+ mBtnScriptLimits->setVisible(false);
+ }
+ }
mBtnBuyGroupLand = getChild<LLButton>("Buy For Group...");
mBtnBuyGroupLand->setClickedCallback(onClickBuyLand, (void*)&BUY_GROUP_LAND);