diff options
Diffstat (limited to 'editor/editor_help.cpp')
-rw-r--r-- | editor/editor_help.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 8fb307a77d..11cb61370d 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -252,8 +252,8 @@ void EditorHelpSearch::_confirmed() { return; String mdata = ti->get_metadata(0); + EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); emit_signal("go_to_help", mdata); - editor->call("_editor_select", EditorNode::EDITOR_SCRIPT); // in case EditorHelpSearch beeen invoked on top of other editor window // go to that hide(); } @@ -288,7 +288,6 @@ void EditorHelpSearch::_bind_methods() { EditorHelpSearch::EditorHelpSearch() { - editor = EditorNode::get_singleton(); VBoxContainer *vbc = memnew(VBoxContainer); add_child(vbc); @@ -362,8 +361,8 @@ void EditorHelpIndex::_tree_item_selected() { if (!s) return; + EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); emit_signal("open_class", s->get_text(0)); - hide(); //_goto_desc(s->get_text(0)); @@ -371,12 +370,10 @@ void EditorHelpIndex::_tree_item_selected() { void EditorHelpIndex::select_class(const String &p_class) { - EditorNode *editor = EditorNode::get_singleton(); if (!tree_item_map.has(p_class)) return; tree_item_map[p_class]->select(0); class_list->ensure_cursor_is_visible(); - editor->call("_editor_select", EditorNode::EDITOR_SCRIPT); // in case EditorHelpIndex beeen invoked on top of other editor window } void EditorHelpIndex::popup() { @@ -1281,7 +1278,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { void EditorHelp::_request_help(const String &p_string) { Error err = _goto_desc(p_string); if (err == OK) { - editor->call("_editor_select", EditorNode::EDITOR_SCRIPT); + EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); } //100 palabras } @@ -1691,8 +1688,6 @@ void EditorHelp::_bind_methods() { EditorHelp::EditorHelp() { - editor = EditorNode::get_singleton(); - VBoxContainer *vbc = this; EDITOR_DEF("text_editor/help/sort_functions_alphabetically", true); |