summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-05-17 18:05:05 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-05-17 18:05:05 +0300
commit033b04f3883a0cc9024f45b5e9a0d792cf6dbb77 (patch)
treeac49627e31aabda8aaa4b21c74c5aee2b2ea46e8 /indra/newview/llviewermenu.cpp
parent07dc391ab76a8860d04bfb001cdc686cd576663d (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
Merge branch 'main' into DRTVWR-582-maint-U
# Conflicts: # indra/newview/llagentlistener.cpp # indra/newview/llcommanddispatcherlistener.cpp # indra/newview/llfilepicker_mac.mm # indra/newview/llworldmapview.cpp
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 c762e796aa..87ebef6a90 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2896,6 +2896,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
@@ -7952,7 +7959,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
@@ -9684,6 +9691,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));