diff options
author | Brad Linden <brad@lindenlab.com> | 2023-05-17 11:17:48 -0700 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2023-05-17 11:17:48 -0700 |
commit | 2f44377b3e98d60f1bd5b1a495c9a3aab9cfa450 (patch) | |
tree | 0c9b22edca280d8e2a2ef280360485c139c9b829 /indra/newview/llviewermenu.cpp | |
parent | 4758355c599d1487c11884d3f700981e011cb7b7 (diff) | |
parent | 5a70639b7992842a9f74ec81b11bac56608b8f2e (diff) |
Merge remote-tracking branch 'origin/main' into DRTVWR-559
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-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 d22ffc784a..d4dc813bba 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2780,6 +2780,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; +} + struct LLSelectedTEGetmatIdAndPermissions : public LLSelectedTEFunctor { LLSelectedTEGetmatIdAndPermissions() : mCanCopy(true), mCanModify(true), mCanTransfer(true) {} @@ -7919,7 +7926,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 @@ -9645,6 +9652,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.EnableEditGLTFMaterial", boost::bind(&enable_object_edit_gltf_material)); enable.add("Object.EnableSaveGLTFMaterial", boost::bind(&enable_object_save_gltf_material)); enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); |