mirror of https://github.com/godotengine/godot
Add setting for automatically opening scripts
This commit is contained in:
parent
f4f0679a2d
commit
14afee66c4
|
|
@ -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).
|
||||
</member>
|
||||
<member name="docks/filesystem/automatically_open_created_scripts" type="bool" setter="" getter="">
|
||||
If [code]true[/code], scripts created in FileSystem dock will be automatically edited.
|
||||
</member>
|
||||
<member name="docks/filesystem/other_file_extensions" type="String" setter="" getter="">
|
||||
A comma separated list of unsupported file extensions to show in the FileSystem dock, e.g. [code]"ico,icns"[/code].
|
||||
</member>
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -696,6 +696,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
_initial_set("docks/filesystem/always_show_folders", true);
|
||||
_initial_set("docks/filesystem/textfile_extensions", "txt,md,cfg,ini,log,json,yml,yaml,toml,xml");
|
||||
_initial_set("docks/filesystem/other_file_extensions", "ico,icns");
|
||||
_initial_set("docks/filesystem/automatically_open_created_scripts", true);
|
||||
|
||||
// Property editor
|
||||
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "docks/property_editor/auto_refresh_interval", 0.2, "0.01,1,0.001"); // Update 5 times per second by default.
|
||||
|
|
|
|||
Loading…
Reference in New Issue