summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-11-01 23:12:58 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-11-01 23:12:58 +0200
commit31115dac2c534dfa45c04a2af3e66afcff87cdc9 (patch)
treef256338e9e4cea3fddd34b67d08cbf6b0a3e8bb0 /indra
parent39e08b34b10fa16f22a97caa426e034d7b2afc9d (diff)
parentf3dd2bf95f942653123ec7a1011cf873fa7b4fb3 (diff)
Merge remote-tracking branch 'RyeMutt/viewer/minor-fixes' into DRTVWR-570-maint-Q
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lllineeditor.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp20
2 files changed, 10 insertions, 12 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index f16f8c3e8d..940cf398c0 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -1560,7 +1560,7 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask )
KEY_SHIFT != key &&
KEY_CONTROL != key &&
KEY_ALT != key &&
- KEY_CAPSLOCK )
+ KEY_CAPSLOCK != key)
{
deselect();
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 01e4734b3c..e369c4e8e4 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2803,14 +2803,15 @@ void handle_object_show_original()
}
-static void init_default_item_label(const std::string& item_name)
+static void init_default_item_label(LLUICtrl* ctrl)
{
+ const std::string& item_name = ctrl->getName();
boost::unordered_map<std::string, LLStringExplicit>::iterator it = sDefaultItemLabels.find(item_name);
if (it == sDefaultItemLabels.end())
{
// *NOTE: This will not work for items of type LLMenuItemCheckGL because they return boolean value
// (doesn't seem to matter much ATM).
- LLStringExplicit default_label = gMenuHolder->childGetValue(item_name).asString();
+ LLStringExplicit default_label = ctrl->getValue().asString();
if (!default_label.empty())
{
sDefaultItemLabels.insert(std::pair<std::string, LLStringExplicit>(item_name, default_label));
@@ -2841,18 +2842,17 @@ bool enable_object_touch(LLUICtrl* ctrl)
new_value = obj->flagHandleTouch() || (parent && parent->flagHandleTouch());
}
- std::string item_name = ctrl->getName();
- init_default_item_label(item_name);
+ init_default_item_label(ctrl);
// Update label based on the node touch name if available.
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
if (node && node->mValid && !node->mTouchName.empty())
{
- gMenuHolder->childSetValue(item_name, node->mTouchName);
+ ctrl->setValue(node->mTouchName);
}
else
{
- gMenuHolder->childSetValue(item_name, get_default_item_label(item_name));
+ ctrl->setValue(get_default_item_label(ctrl->getName()));
}
return new_value;
@@ -6592,20 +6592,18 @@ bool enable_object_sit(LLUICtrl* ctrl)
bool sitting_on_sel = sitting_on_selection();
if (!sitting_on_sel)
{
- std::string item_name = ctrl->getName();
-
// init default labels
- init_default_item_label(item_name);
+ init_default_item_label(ctrl);
// Update label
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
if (node && node->mValid && !node->mSitName.empty())
{
- gMenuHolder->childSetValue(item_name, node->mSitName);
+ ctrl->setValue(node->mSitName);
}
else
{
- gMenuHolder->childSetValue(item_name, get_default_item_label(item_name));
+ ctrl->setValue(get_default_item_label(ctrl->getName()));
}
}
return !sitting_on_sel && is_object_sittable();