diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2012-08-08 16:01:28 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2012-08-08 16:01:28 +0300 |
commit | 1341d591e3b9183de8568e7be81f7e2f4146727f (patch) | |
tree | 225958c0401cc8eea9b5e687c9598c41a0c98d16 /indra/newview | |
parent | eb9f84be17d28d7c41d24376261fa3c085331e15 (diff) |
MAINT-269 FIXED Check if current agent is owner of the parcel before enabling "Buy pass"
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterland.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 55f3d548ec..be743d57d2 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -783,8 +783,9 @@ void LLPanelLandGeneral::refresh() mBtnReleaseLand->setEnabled( can_release ); } - BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();; + BOOL use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();; mBtnBuyPass->setEnabled(use_pass); + } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9aa4cfa494..54efcd61a8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -341,7 +341,8 @@ LLMenuParcelObserver::~LLMenuParcelObserver() void LLMenuParcelObserver::changed() { - gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL)); + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); + gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID()== gAgent.getID())); BOOL buyable = enable_buy_land(NULL); gMenuHolder->childSetEnabled("Land Buy", buyable); |