Add setting for automatically opening scripts

This commit is contained in:
kobewi 2026-02-02 14:11:40 +01:00
parent f4f0679a2d
commit 14afee66c4
3 changed files with 7 additions and 0 deletions

View file

@ -2833,6 +2833,9 @@ void FileSystemDock::_resource_created() {
}
void FileSystemDock::_script_or_shader_created(const Ref<Resource> &p_resource) {
if (Object::cast_to<Script>(p_resource.ptr()) && !EDITOR_GET("docks/filesystem/automatically_open_created_scripts").operator bool()) {
return;
}
EditorNode::get_singleton()->push_item(p_resource.ptr());
}