diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-11-16 01:34:29 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-11-16 01:34:29 +0200 |
commit | 981cdca0a5f874fb02694ae5bb39c99784762481 (patch) | |
tree | f7001c629f918e6fff756574128cb068dd25d309 /indra/newview/llviewermenu.cpp | |
parent | f9e7e59405a161828ec5dde624299b8aa67dc5b7 (diff) | |
parent | 9957c28ddc5e5c129af2db662da7d69f1509af65 (diff) |
Merge branch 'master' into DRTVWR-483
# Conflicts:
# indra/llui/lltextbase.h
# indra/newview/VIEWER_VERSION.txt
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e5bccaab36..0b4933fccc 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -360,11 +360,21 @@ LLMenuParcelObserver::~LLMenuParcelObserver() void LLMenuParcelObserver::changed() { 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); - gMenuHolder->childSetEnabled("Buy Land...", buyable); + if (gMenuLand && parcel) + { + LLView* child = gMenuLand->findChild<LLView>("Land Buy Pass"); + if (child) + { + child->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID())); + } + + child = gMenuLand->findChild<LLView>("Land Buy"); + if (child) + { + BOOL buyable = enable_buy_land(NULL); + child->setEnabled(buyable); + } + } } @@ -7317,7 +7327,7 @@ namespace }; } -void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) +bool queue_actions(LLFloaterScriptQueue* q, const std::string& msg) { QueueObjects func(q); LLSelectMgr *mgr = LLSelectMgr::getInstance(); @@ -7339,6 +7349,7 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) { LL_ERRS() << "Bad logic." << LL_ENDL; } + q->closeFloater(); } else { @@ -7347,6 +7358,7 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) LL_WARNS() << "Unexpected script compile failure." << LL_ENDL; } } + return !fail; } class LLToolsSelectedScriptAction : public view_listener_t @@ -7394,8 +7406,10 @@ class LLToolsSelectedScriptAction : public view_listener_t if (queue) { queue->setMono(mono); - queue_actions(queue, msg); - queue->setTitle(title); + if (queue_actions(queue, msg)) + { + queue->setTitle(title); + } } else { @@ -8589,7 +8603,7 @@ class LLEditEnableTakeOff : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string clothing = userdata.asString(); - LLWearableType::EType type = LLWearableType::typeNameToType(clothing); + LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(clothing); if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) return LLAgentWearables::selfHasWearable(type); return false; @@ -8605,7 +8619,7 @@ class LLEditTakeOff : public view_listener_t LLAppearanceMgr::instance().removeAllClothesFromAvatar(); else { - LLWearableType::EType type = LLWearableType::typeNameToType(clothing); + LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(clothing); if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT && (gAgentWearables.getWearableCount(type) > 0)) |