diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_help.cpp | 12 | ||||
-rw-r--r-- | editor/editor_help.h | 2 |
2 files changed, 4 insertions, 10 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 8fb307a77d..7fe483c834 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -253,7 +253,7 @@ void EditorHelpSearch::_confirmed() { String mdata = ti->get_metadata(0); emit_signal("go_to_help", mdata); - editor->call("_editor_select", EditorNode::EDITOR_SCRIPT); // in case EditorHelpSearch beeen invoked on top of other editor window + EditorNode::get_singleton()->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); @@ -363,7 +362,7 @@ void EditorHelpIndex::_tree_item_selected() { return; emit_signal("open_class", s->get_text(0)); - + EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT); hide(); //_goto_desc(s->get_text(0)); @@ -371,12 +370,11 @@ 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 + EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT); // in case EditorHelpIndex beeen invoked on top of other editor window } void EditorHelpIndex::popup() { @@ -1281,7 +1279,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()->call("_editor_select", EditorNode::EDITOR_SCRIPT); } //100 palabras } @@ -1691,8 +1689,6 @@ void EditorHelp::_bind_methods() { EditorHelp::EditorHelp() { - editor = EditorNode::get_singleton(); - VBoxContainer *vbc = this; EDITOR_DEF("text_editor/help/sort_functions_alphabetically", true); diff --git a/editor/editor_help.h b/editor/editor_help.h index d6fc0e3bf2..46d83490f4 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -49,7 +49,6 @@ class EditorHelpSearch : public ConfirmationDialog { GDCLASS(EditorHelpSearch, ConfirmationDialog) - EditorNode *editor; LineEdit *search_box; Tree *search_options; String base_type; @@ -119,7 +118,6 @@ class EditorHelp : public VBoxContainer { String edited_class; - EditorNode *editor; Map<String, int> method_line; Map<String, int> signal_line; Map<String, int> property_line; |