aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_help.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson2017-05-28 19:40:13 +0700
committerPoommetee Ketson2017-05-31 23:54:54 +0700
commitef7d1b1571a2eab21fb7b3e0652d0b90f10420c8 (patch)
treeed66ec91a408138f466cda34389ea65cb116b5c1 /editor/editor_help.cpp
parentd82cc20c2a6382697b02eb5c376266e119e8b047 (diff)
downloadgodot-ef7d1b1571a2eab21fb7b3e0652d0b90f10420c8.tar.gz
godot-ef7d1b1571a2eab21fb7b3e0652d0b90f10420c8.tar.zst
godot-ef7d1b1571a2eab21fb7b3e0652d0b90f10420c8.zip
EditorHelp: Help>Class now switch to script editor
Diffstat (limited to 'editor/editor_help.cpp')
-rw-r--r--editor/editor_help.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 8fb307a77..7fe483c83 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);