diff options
-rw-r--r-- | editor/editor_audio_buses.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 365238222f..3f773c646a 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1249,7 +1249,7 @@ void EditorAudioBuses::_load_default_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()) { EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path)); return; @@ -1266,7 +1266,7 @@ void EditorAudioBuses::_load_default_layout() { void EditorAudioBuses::_file_dialog_callback(const String &p_string) { 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()) { EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout.")); return; @@ -1404,7 +1404,7 @@ void EditorAudioBuses::open_layout(const String &p_path) { 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()) { EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout.")); return; diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 437a6722d0..e1fafde6b9 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -4236,7 +4236,7 @@ void CanvasItemEditor::_button_zoom_minus() { } void CanvasItemEditor::_button_zoom_reset() { - _zoom_on_position(1.0 * EDSCALE, viewport_scrollable->get_size() / 2.0); + _zoom_on_position(1.0 * MAX(1, EDSCALE), viewport_scrollable->get_size() / 2.0); } void CanvasItemEditor::_button_zoom_plus() { @@ -5038,7 +5038,7 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) { if (state.has("zoom")) { // Compensate the editor scale, so that the editor scale can be changed // and the zoom level will still be the same (relative to the editor scale). - zoom = float(p_state["zoom"]) * EDSCALE; + zoom = float(p_state["zoom"]) * MAX(1, EDSCALE); _update_zoom_label(); } |