summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-29 09:37:53 +0200
committerGitHub <noreply@github.com>2020-04-29 09:37:53 +0200
commit2ed231521b125b12fc604f021ee323c008c69c30 (patch)
tree510c3b49e80acdb3ca0f89941787582bb4983a85 /editor/plugins
parent5cae0f3402a2cc8b336fc6669e553a8b419c3564 (diff)
parent235f13dc512ce2f77847698cf16e94a7dd5aaf82 (diff)
Merge pull request #37705 from dreamsComeTrue/editor-animation-player-improvements
Allow to rename animation just after it was duplicated in Editor
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index db51c5c6ba..0a252cc0a3 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -433,7 +433,9 @@ void AnimationPlayerEditor::_animation_remove() {
if (animation->get_item_count() == 0)
return;
- delete_dialog->set_text(TTR("Delete Animation?"));
+ String current = animation->get_item_text(animation->get_selected());
+
+ delete_dialog->set_text(TTR("Delete Animation '" + current + "'?"));
delete_dialog->popup_centered();
}
@@ -1135,7 +1137,9 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
case TOOL_DUPLICATE_ANIM: {
_animation_duplicate();
- } break;
+
+ [[fallthrough]]; // Allow immediate rename after animation is duplicated
+ }
case TOOL_RENAME_ANIM: {
_animation_rename();