diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-01-24 14:14:37 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-01-24 14:17:08 +0200 |
commit | 1109fca197325b0e081c8c2b9ed7c9e455035e83 (patch) | |
tree | 95453a2b94164a95084591c4d55799ffbdd16abe /indra/newview | |
parent | a94f907a17aa754a3c75dbf5491b57fdde466367 (diff) |
SL-19025 Fix for object's context menu
Inspect and copy doesn't work for face or child selection. Disable them in such cases.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c796ed30f7..37227518f5 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)); |