Expose FileSystemDock to the scripting API and fixed signals

Fixed FileSystemDock's `file_removed` and `folder_removed` signals not being
emitted because the emitted was using the wrong signal name.

(cherry picked from commit fe0b783e70)
This commit is contained in:
Ignacio Etcheverry
2020-03-17 01:40:15 +01:00
parent 69081c000d
commit 110523fecc
5 changed files with 19 additions and 10 deletions

View File

@ -227,6 +227,10 @@ EditorFileSystem *EditorInterface::get_resource_file_system() {
return EditorFileSystem::get_singleton();
}
FileSystemDock *EditorInterface::get_file_system_dock() {
return EditorNode::get_singleton()->get_filesystem_dock();
}
EditorSelection *EditorInterface::get_selection() {
return EditorNode::get_singleton()->get_editor_selection();
}
@ -296,6 +300,7 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("select_file", "file"), &EditorInterface::select_file);
ClassDB::bind_method(D_METHOD("get_selected_path"), &EditorInterface::get_selected_path);
ClassDB::bind_method(D_METHOD("get_current_path"), &EditorInterface::get_current_path);
ClassDB::bind_method(D_METHOD("get_file_system_dock"), &EditorInterface::get_file_system_dock);
ClassDB::bind_method(D_METHOD("set_plugin_enabled", "plugin", "enabled"), &EditorInterface::set_plugin_enabled);
ClassDB::bind_method(D_METHOD("is_plugin_enabled", "plugin"), &EditorInterface::is_plugin_enabled);