From 14afee66c4343b803ca8fc6f5f72cfccbedf63da Mon Sep 17 00:00:00 2001 From: kobewi Date: Mon, 2 Feb 2026 14:11:40 +0100 Subject: [PATCH] Add setting for automatically opening scripts --- doc/classes/EditorSettings.xml | 3 +++ editor/docks/filesystem_dock.cpp | 3 +++ editor/settings/editor_settings.cpp | 1 + 3 files changed, 7 insertions(+) diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index a09ad92ef3f..f55f9cb6e00 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -281,6 +281,9 @@ If [code]true[/code], displays folders in the FileSystem dock's bottom pane when split mode is enabled. If [code]false[/code], only files will be displayed in the bottom pane. Split mode can be toggled by pressing the icon next to the [code]res://[/code] folder path. [b]Note:[/b] This setting has no effect when split mode is disabled (which is the default). + + If [code]true[/code], scripts created in FileSystem dock will be automatically edited. + A comma separated list of unsupported file extensions to show in the FileSystem dock, e.g. [code]"ico,icns"[/code]. diff --git a/editor/docks/filesystem_dock.cpp b/editor/docks/filesystem_dock.cpp index 0f2ab5e9d11..4d70d4cfc91 100644 --- a/editor/docks/filesystem_dock.cpp +++ b/editor/docks/filesystem_dock.cpp @@ -2833,6 +2833,9 @@ void FileSystemDock::_resource_created() { } void FileSystemDock::_script_or_shader_created(const Ref &p_resource) { + if (Object::cast_to