diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 6 | ||||
-rw-r--r-- | editor/scene_tree_dock.cpp | 8 |
4 files changed, 17 insertions, 11 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index bcfc516849..93caf7944c 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -553,8 +553,6 @@ void EditorNode::_update_from_settings() { tree->set_debug_collision_contact_color(GLOBAL_GET("debug/shapes/collision/contact_color")); tree->set_debug_navigation_color(GLOBAL_GET("debug/shapes/navigation/geometry_color")); tree->set_debug_navigation_disabled_color(GLOBAL_GET("debug/shapes/navigation/disabled_geometry_color")); - - _update_title(); } void EditorNode::_select_default_main_screen_plugin() { @@ -584,7 +582,11 @@ void EditorNode::_notification(int p_what) { opening_prev = false; } - unsaved_cache = saved_version != editor_data.get_undo_redo().get_version(); + bool unsaved_cache_changed = false; + if (unsaved_cache != (saved_version != editor_data.get_undo_redo().get_version())) { + unsaved_cache = (saved_version != editor_data.get_undo_redo().get_version()); + unsaved_cache_changed = true; + } if (last_checked_version != editor_data.get_undo_redo().get_version()) { _update_scene_tabs(); @@ -614,6 +616,10 @@ void EditorNode::_notification(int p_what) { ResourceImporterTexture::get_singleton()->update_imports(); + if (settings_changed || unsaved_cache_changed) { + _update_title(); + } + if (settings_changed) { _update_from_settings(); settings_changed = false; diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 98ccc1fdbe..e5ca5d66e8 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1053,7 +1053,7 @@ void AnimationPlayerEditor::_animation_duplicate() { _update_name_dialog_library_dropdown(); name_dialog_op = TOOL_DUPLICATE_ANIM; - name_dialog->set_title("Duplicate Animation"); + name_dialog->set_title(TTR("Duplicate Animation")); name_title->set_text(TTR("Duplicated Animation Name:")); name->set_text(new_name); name_dialog->popup_centered(Size2(300, 90)); diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 2ba2466646..00cc5a6ca0 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -817,11 +817,11 @@ bool AnimationNodeStateMachineEditor::_create_submenu(PopupMenu *p_menu, Ref<Ani Vector<Ref<AnimationNodeStateMachine>> parents = p_parents; if (from_root) { - Ref<AnimationNodeStateMachine> prev = p_nodesm->get_prev_state_machine(); + AnimationNodeStateMachine *prev = p_nodesm->get_prev_state_machine(); - while (prev.is_valid()) { + while (prev != nullptr) { parents.push_back(prev); - p_nodesm = prev; + p_nodesm = Ref<AnimationNodeStateMachine>(prev); prev_path += "../"; prev = prev->get_prev_state_machine(); } diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 08df4cdf3c..2e1090e6c0 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -2418,8 +2418,8 @@ void SceneTreeDock::_new_scene_from(String p_file) { Node *copy = base->duplicate_from_editor(duplimap); if (copy) { - for (int i = 0; i < copy->get_child_count(); i++) { - _set_node_owner_recursive(copy->get_child(i), copy); + for (int i = 0; i < copy->get_child_count(false); i++) { + _set_node_owner_recursive(copy->get_child(i, false), copy); } Ref<PackedScene> sdata = memnew(PackedScene); @@ -2456,8 +2456,8 @@ void SceneTreeDock::_set_node_owner_recursive(Node *p_node, Node *p_owner) { p_node->set_owner(p_owner); } - for (int i = 0; i < p_node->get_child_count(); i++) { - _set_node_owner_recursive(p_node->get_child(i), p_owner); + for (int i = 0; i < p_node->get_child_count(false); i++) { + _set_node_owner_recursive(p_node->get_child(i, false), p_owner); } } |