summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-11-16 16:41:15 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-11-16 17:44:15 +0200
commit132c536d9c05be2d2fd2dcef3ea6c7ae135fa5d2 (patch)
tree376ae6246fce7ebbb9b7c620ca9c64bab51ca163 /indra/newview/llviewermenu.cpp
parent83ae032ff349581199212129a03a7c44899a3e17 (diff)
parent9957c28ddc5e5c129af2db662da7d69f1509af65 (diff)
Merge branch 'master' into DRTVWR-539
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp34
1 files changed, 24 insertions, 10 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index fa2ada32b3..242a76b767 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);
+ }
+ }
}
@@ -7282,7 +7292,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();
@@ -7304,6 +7314,7 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg)
{
LL_ERRS() << "Bad logic." << LL_ENDL;
}
+ q->closeFloater();
}
else
{
@@ -7312,6 +7323,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
@@ -7359,8 +7371,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
{
@@ -8554,7 +8568,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;
@@ -8570,7 +8584,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))