SL-15729 Using gMenuLand instead of gMenuHolder

These UI elements belong to gMenuLand, "Buy Land..." no longer exists
meow-7.2.2
Andrey Kleshchev 2021-07-30 21:55:35 +03:00
parent 6de3a7f91d
commit 08e31fc642
1 changed files with 12 additions and 5 deletions

View File

@ -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);
}
}
}