summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-07-30 21:55:35 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-07-30 21:55:35 +0300
commit08e31fc6423e0536fbeb780cd22506de53beb32a (patch)
treebc95d332435e8f1b8e61bfe52e91dc6ded49043b
parent6de3a7f91dc5d508834a8cf1e399a21be948fe43 (diff)
SL-15729 Using gMenuLand instead of gMenuHolder
These UI elements belong to gMenuLand, "Buy Land..." no longer exists
-rw-r--r--indra/newview/llviewermenu.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 6daf99156c..8837bda63d 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -360,13 +360,20 @@ LLMenuParcelObserver::~LLMenuParcelObserver()
void LLMenuParcelObserver::changed()
{
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
- if (gMenuHolder && parcel)
+ if (gMenuLand && parcel)
{
- gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
+ LLView* child = gMenuLand->findChild<LLView>("Land Buy Pass");
+ if (child)
+ {
+ child->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
+ }
- BOOL buyable = enable_buy_land(NULL);
- gMenuHolder->childSetEnabled("Land Buy", buyable);
- gMenuHolder->childSetEnabled("Buy Land...", buyable);
+ child = gMenuLand->findChild<LLView>("Land Buy");
+ if (child)
+ {
+ BOOL buyable = enable_buy_land(NULL);
+ child->setEnabled(buyable);
+ }
}
}