summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-07-12 10:08:56 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-07-12 10:08:56 -0400
commit73d90aa9dd87986dc2ef8f39db346b71c58b181b (patch)
treea2ec930f732aaed7d7addbb22bb34b15c78d408b /indra/newview/llviewermenu.cpp
parent8e70575be833cf2056b1ceef7ef842cbc7700ce0 (diff)
parente80f0f331dbfca686e0a80c557e9b1e455c8d167 (diff)
SL-18837: Merge branch 'DRTVWR-587-maint-V' into rm-cxxstd.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 998f5c020e..ea409bc8a7 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2876,6 +2876,13 @@ void handle_object_open()
LLFloaterReg::showInstance("openobject");
}
+bool enable_object_inspect()
+{
+ LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
+ LLViewerObject* selected_objectp = selection->getFirstRootObject();
+ return selected_objectp != NULL;
+}
+
bool enable_object_open()
{
// Look for contents in root object, which is all the LLFloaterOpenObject
@@ -7943,7 +7950,7 @@ bool enable_object_take_copy()
bool all_valid = false;
if (LLSelectMgr::getInstance())
{
- if (!LLSelectMgr::getInstance()->getSelection()->isEmpty())
+ if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 0)
{
all_valid = true;
#ifndef HACKED_GODLIKE_VIEWER
@@ -9650,6 +9657,7 @@ void initialize_menus()
commit.add("Object.Open", boost::bind(&handle_object_open));
commit.add("Object.Take", boost::bind(&handle_take));
commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector));
+ enable.add("Object.EnableInspect", boost::bind(&enable_object_inspect));
enable.add("Object.EnableOpen", boost::bind(&enable_object_open));
enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1));
enable.add("Object.EnableDelete", boost::bind(&enable_object_delete));