summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/GraphNode.xml2
-rw-r--r--editor/filesystem_dock.cpp2
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp2
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp4
-rw-r--r--editor/scene_tree_editor.cpp2
-rw-r--r--scene/resources/default_theme/default_theme.cpp1
7 files changed, 12 insertions, 5 deletions
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index 4c39720d69..6e09926c11 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -236,6 +236,8 @@
</theme_item>
<theme_item name="close" type="Texture">
</theme_item>
+ <theme_item name="close_color" type="Color">
+ </theme_item>
<theme_item name="close_offset" type="int">
</theme_item>
<theme_item name="comment" type="StyleBox">
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index b2368fff6b..4cc0b67b8d 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1180,7 +1180,7 @@ void FileSystemDock::_make_dir_confirm() {
String dir_name = make_dir_dialog_text->get_text().strip_edges();
if (dir_name.length() == 0) {
- EditorNode::get_singleton()->show_warning(TTR("No name provided"));
+ EditorNode::get_singleton()->show_warning(TTR("No name provided."));
return;
} else if (dir_name.find("/") != -1 || dir_name.find("\\") != -1 || dir_name.find(":") != -1 || dir_name.find("*") != -1 ||
dir_name.find("|") != -1 || dir_name.find(">") != -1 || dir_name.ends_with(".") || dir_name.ends_with(" ")) {
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 586b7668ad..cb18832641 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -72,7 +72,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
ap->get_animation_list(&names);
for (List<StringName>::Element *E = names.front(); E; E = E->next()) {
- animations_menu->add_icon_item(get_icon("Animation", "Editoricons"), E->get());
+ animations_menu->add_icon_item(get_icon("Animation", "EditorIcons"), E->get());
animations_to_add.push_back(E->get());
}
}
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 81d048b2b4..06c2db74af 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -395,7 +395,7 @@ void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) {
undo_redo->create_action("Delete Node");
undo_redo->add_do_method(blend_tree.ptr(), "remove_node", p_which);
- undo_redo->add_undo_method(blend_tree.ptr(), "add_node", p_which, blend_tree->get_node(p_which));
+ undo_redo->add_undo_method(blend_tree.ptr(), "add_node", p_which, blend_tree->get_node(p_which), blend_tree.ptr()->get_node_position(p_which));
List<AnimationNodeBlendTree::NodeConnection> conns;
blend_tree->get_node_connections(&conns);
@@ -813,6 +813,8 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
break;
}
}
+
+ _update_graph(); // Needed to update the signal connections with the new name.
}
void AnimationNodeBlendTreeEditor::_node_renamed_focus_out(Node *le, Ref<AnimationNode> p_node) {
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index df7ac0b587..8efd12ecf9 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -1073,7 +1073,9 @@ void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) {
ERR_FAIL_COND(new_name == "" || new_name.find(".") != -1 || new_name.find("/") != -1)
- ERR_FAIL_COND(new_name == prev_name);
+ if (new_name == prev_name) {
+ return; // Nothing to do.
+ }
String base_name = new_name;
int base = 1;
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 7205f34343..657293ea7f 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -668,7 +668,7 @@ void SceneTreeEditor::_renamed() {
// Empty node names are not allowed, so resets it to previous text and show warning
if (which->get_text(0).strip_edges().empty()) {
which->set_text(0, n->get_name());
- EditorNode::get_singleton()->show_warning(TTR("No name provided"));
+ EditorNode::get_singleton()->show_warning(TTR("No name provided."));
return;
}
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index b0c1dcde9a..7d7bf8a750 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -600,6 +600,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("resizer", "GraphNode", make_icon(window_resizer_png));
theme->set_font("title_font", "GraphNode", default_font);
theme->set_color("title_color", "GraphNode", Color(0, 0, 0, 1));
+ theme->set_color("close_color", "GraphNode", Color(0, 0, 0, 1));
theme->set_constant("title_offset", "GraphNode", 20 * scale);
theme->set_constant("close_offset", "GraphNode", 18 * scale);
theme->set_constant("port_offset", "GraphNode", 3 * scale);