diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/animation_track_editor.cpp | 2 | ||||
-rw-r--r-- | editor/editor_file_system.cpp | 8 | ||||
-rw-r--r-- | editor/editor_node.cpp | 5 | ||||
-rw-r--r-- | editor/plugins/animation_blend_tree_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/animation_blend_tree_editor_plugin.h | 1 | ||||
-rw-r--r-- | editor/project_manager.cpp | 5 |
6 files changed, 20 insertions, 7 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 8ae6638e80..89bb1f5ae6 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -1253,7 +1253,7 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) { editing = true; Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); - undo_redo->create_action(TTR("Change Animation Length")); + undo_redo->create_action(TTR("Change Animation Length"), UndoRedo::MERGE_ENDS); undo_redo->add_do_method(animation.ptr(), "set_length", p_new_len); undo_redo->add_undo_method(animation.ptr(), "set_length", animation->get_length()); undo_redo->commit_action(); diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 28424d53b1..4efc7c3055 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -433,7 +433,7 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo } if (!found_uid) { - return true; //UUID not found, old format, reimport. + return true; //UID not found, old format, reimport. } Ref<ResourceImporter> importer = ResourceFormatImporter::get_singleton()->get_importer_by_name(importer_name); @@ -868,7 +868,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAc } if (fc->uid == ResourceUID::INVALID_ID) { - // imported files should always have a UUID, so attempt to fetch it. + // imported files should always have a UID, so attempt to fetch it. fi->uid = ResourceLoader::get_resource_uid(path); } @@ -2319,14 +2319,14 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const } if (p_generate) { - return ResourceUID::get_singleton()->create_id(); // Just create a new one, we will be notified of save anyway and fetch the right UUID at that time, to keep things simple. + return ResourceUID::get_singleton()->create_id(); // Just create a new one, we will be notified of save anyway and fetch the right UID at that time, to keep things simple. } else { return ResourceUID::INVALID_ID; } } else if (fs->files[cpos]->uid != ResourceUID::INVALID_ID) { return fs->files[cpos]->uid; } else if (p_generate) { - return ResourceUID::get_singleton()->create_id(); // Just create a new one, we will be notified of save anyway and fetch the right UUID at that time, to keep things simple. + return ResourceUID::get_singleton()->create_id(); // Just create a new one, we will be notified of save anyway and fetch the right UID at that time, to keep things simple. } else { return ResourceUID::INVALID_ID; } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 03ece6c29b..ab79031ad2 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6093,7 +6093,10 @@ EditorNode::EditorNode() { } // Define a minimum window size to prevent UI elements from overlapping or being cut off. - DisplayServer::get_singleton()->window_set_min_size(Size2(1024, 600) * EDSCALE); + Window *w = Object::cast_to<Window>(SceneTree::get_singleton()->get_root()); + if (w) { + w->set_min_size(Size2(1024, 600) * EDSCALE); + } FileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files")); EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files")); diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 0ebc780604..f680993026 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -425,6 +425,11 @@ void AnimationNodeBlendTreeEditor::_connection_from_empty(const String &p_to, in } } +void AnimationNodeBlendTreeEditor::_popup_hide() { + to_node = ""; + to_slot = -1; +} + void AnimationNodeBlendTreeEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_to, const StringName &p_which) { updating = true; Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); @@ -1096,6 +1101,7 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() { add_node->set_text(TTR("Add Node...")); graph->get_zoom_hbox()->move_child(add_node, 0); add_node->get_popup()->connect("id_pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_add_node)); + add_node->get_popup()->connect("popup_hide", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_hide), CONNECT_DEFERRED); add_node->connect("about_to_popup", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu).bind(false)); add_node->set_disabled(read_only); diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h index b471d47df6..afb3394238 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.h +++ b/editor/plugins/animation_blend_tree_editor_plugin.h @@ -121,6 +121,7 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin { void _popup_request(const Vector2 &p_position); void _connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position); void _connection_from_empty(const String &p_to, int p_to_slot, const Vector2 &p_release_position); + void _popup_hide(); void _property_changed(const StringName &p_property, const Variant &p_value, const String &p_field, bool p_changing); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index dc755cab41..b4ffc7d78d 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -3008,7 +3008,10 @@ ProjectManager::ProjectManager() { SceneTree::get_singleton()->get_root()->connect("files_dropped", callable_mp(this, &ProjectManager::_files_dropped)); // Define a minimum window size to prevent UI elements from overlapping or being cut off. - DisplayServer::get_singleton()->window_set_min_size(Size2(520, 350) * EDSCALE); + Window *w = Object::cast_to<Window>(SceneTree::get_singleton()->get_root()); + if (w) { + w->set_min_size(Size2(520, 350) * EDSCALE); + } // Resize the bootsplash window based on Editor display scale EDSCALE. float scale_factor = MAX(1, EDSCALE); |