From 980aa276e382a242f0940887f8e0da6eb36630b3 Mon Sep 17 00:00:00 2001 From: groud Date: Wed, 3 Oct 2018 11:25:18 +0200 Subject: [PATCH] Add a shortcut to the documentation in the scene tree RMB menu --- editor/scene_tree_dock.cpp | 31 +++++++++++++++++++++---------- editor/scene_tree_dock.h | 1 + 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 11a0a42b9e4..f2c04d7326a 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -689,6 +689,13 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } } } break; + case TOOL_OPEN_DOCUMENTATION: { + List selection = editor_selection->get_selected_node_list(); + for (int i = 0; i < selection.size(); i++) { + ScriptEditor::get_singleton()->goto_help("class_name:" + selection[i]->get_class()); + } + EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); + } break; case TOOL_SCENE_EDITABLE_CHILDREN: { List selection = editor_selection->get_selected_node_list(); List::Element *e = selection.front(); @@ -2027,6 +2034,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->clear(); + Ref