Repository: godotengine/godot
File: editor/audio/editor_audio_buses.cpp (C++)

Code before:
		if (new_layout) {
			Ref<AudioBusLayout> empty_state;
			empty_state.instantiate();
			AudioServer::get_singleton()->set_bus_layout(empty_state);
		}

		Error err = ResourceSaver::save(AudioServer::get_singleton()->generate_bus_layout(), p_string);
		if (err != OK) {
			EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file: %s"), p_string));
			return;
		}
	}
	open_layout(p_string);
}

void EditorAudioBuses::_bind_methods() {
	ClassDB::bind_method("_update_bus", &EditorAudioBuses::_update_bus);
	ClassDB::bind_method("_update_sends", &EditorAudioBuses::_update_sends);
}

EditorAudioBuses::EditorAudioBuses() {
	set_name(TTRC("Audio"));
	set_icon_name("AudioStreamPlayer");
	set_dock_shortcut(ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_audio_bottom_panel", TTRC("Toggle Audio Dock"), KeyModifierMask::ALT | Key::A));
	set_default_slot(DockConstants::DOCK_SLOT_BOTTOM);
	set_available_layouts(EditorDock::DOCK_LAYOUT_VERTICAL | EditorDock::DOCK_LAYOUT_HORIZONTAL | EditorDock::DOCK_LAYOUT_FLOATING);

	VBoxContainer *main_vb = memnew(VBoxContainer);
	add_child(main_vb);

	top_hb = memnew(HBoxContainer);
	main_vb->add_child(top_hb);

	edited_path = ResourceUID::ensure_path(GLOBAL_GET("audio/buses/default_bus_layout"));

	Label *layout_label = memnew(Label(TTRC("Layout:")));
	top_hb->add_child(layout_label);

	file = memnew(Label);
	const String _file_name = edited_path.get_file();
	file->set_text(_file_name);
	file->set_tooltip_text(_file_name);
	file->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	file->set_mouse_filter(MOUSE_FILTER_PASS);
	file->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
	file->set_h_size_flags(SIZE_EXPAND_FILL);
	top_hb->add_child(file);

	add = memnew(Button);
	top_hb->add_child(add);
	add->set_text(TTR("Add Bus"));

Review comment (suggestion):
```suggestion
	set_available_layouts(EditorDock::DOCK_LAYOUT_ALL);
```

Code after:
		if (new_layout) {
			Ref<AudioBusLayout> empty_state;
			empty_state.instantiate();
			AudioServer::get_singleton()->set_bus_layout(empty_state);
		}

		Error err = ResourceSaver::save(AudioServer::get_singleton()->generate_bus_layout(), p_string);
		if (err != OK) {
			EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file: %s"), p_string));
			return;
		}
	}
	open_layout(p_string);
}

void EditorAudioBuses::_bind_methods() {
	ClassDB::bind_method("_update_bus", &EditorAudioBuses::_update_bus);
	ClassDB::bind_method("_update_sends", &EditorAudioBuses::_update_sends);
}

EditorAudioBuses::EditorAudioBuses() {
	set_name(TTRC("Audio"));
	set_icon_name("AudioStreamPlayer");
	set_dock_shortcut(ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_audio_bottom_panel", TTRC("Toggle Audio Dock"), KeyModifierMask::ALT | Key::A));
	set_default_slot(DockConstants::DOCK_SLOT_BOTTOM);
	set_available_layouts(EditorDock::DOCK_LAYOUT_HORIZONTAL | EditorDock::DOCK_LAYOUT_FLOATING);

	VBoxContainer *main_vb = memnew(VBoxContainer);
	add_child(main_vb);

	top_hb = memnew(HBoxContainer);
	main_vb->add_child(top_hb);

	edited_path = ResourceUID::ensure_path(GLOBAL_GET("audio/buses/default_bus_layout"));

	Label *layout_label = memnew(Label(TTRC("Layout:")));
	top_hb->add_child(layout_label);

	file = memnew(Label);
	const String _file_name = edited_path.get_file();
	file->set_text(_file_name);
	file->set_tooltip_text(_file_name);
	file->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	file->set_mouse_filter(MOUSE_FILTER_PASS);
	file->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
	file->set_h_size_flags(SIZE_EXPAND_FILL);
	top_hb->add_child(file);

	add = memnew(Button);
	top_hb->add_child(add);
	add->set_text(TTR("Add Bus"));