1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Put 2D, 3D and Script editor index in enum

To avoid invalid index out of bounds mistakes.
This commit is contained in:
neikeq
2015-11-25 00:46:44 +01:00
parent 06957a8026
commit 8d97eef0fe
3 changed files with 17 additions and 11 deletions

View File

@@ -263,7 +263,7 @@ void EditorHelpSearch::_confirmed() {
String mdata=ti->get_metadata(0);
emit_signal("go_to_help",mdata);
editor->call("_editor_select",2); // in case EditorHelpSearch beeen invoked on top of other editor window
editor->call("_editor_select",EditorNode::EDITOR_SCRIPT); // in case EditorHelpSearch beeen invoked on top of other editor window
// go to that
hide();
}
@@ -1049,7 +1049,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",2);
editor->call("_editor_select",EditorNode::EDITOR_SCRIPT);
}
//100 palabras
}