Merge pull request #35304 from raphael10241024/fix_audiobus_editor

fix audio buses layout editor save
This commit is contained in:
Rémi Verschelde 2020-01-19 09:13:05 +01:00 committed by GitHub
commit 78c2d41ffc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1249,7 +1249,7 @@ void EditorAudioBuses::_load_default_layout() {
String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout");
Ref<AudioBusLayout> state = ResourceLoader::load(layout_path); Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", true);
if (state.is_null()) { if (state.is_null()) {
EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path)); EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path));
return; return;
@ -1266,7 +1266,7 @@ void EditorAudioBuses::_load_default_layout() {
void EditorAudioBuses::_file_dialog_callback(const String &p_string) { void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
if (file_dialog->get_mode() == EditorFileDialog::MODE_OPEN_FILE) { if (file_dialog->get_mode() == EditorFileDialog::MODE_OPEN_FILE) {
Ref<AudioBusLayout> state = ResourceLoader::load(p_string); Ref<AudioBusLayout> state = ResourceLoader::load(p_string, "", true);
if (state.is_null()) { if (state.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout.")); EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout."));
return; return;
@ -1404,7 +1404,7 @@ void EditorAudioBuses::open_layout(const String &p_path) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(this); EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
Ref<AudioBusLayout> state = ResourceLoader::load(p_path); Ref<AudioBusLayout> state = ResourceLoader::load(p_path, "", true);
if (state.is_null()) { if (state.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout.")); EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout."));
return; return;