From 08e31fc6423e0536fbeb780cd22506de53beb32a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 30 Jul 2021 21:55:35 +0300 Subject: SL-15729 Using gMenuLand instead of gMenuHolder These UI elements belong to gMenuLand, "Buy Land..." no longer exists --- indra/newview/llviewermenu.cpp | 17 ++++++++++++----- 1 file 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("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("Land Buy"); + if (child) + { + BOOL buyable = enable_buy_land(NULL); + child->setEnabled(buyable); + } } } -- cgit v1.2.3