summaryrefslogtreecommitdiff
path: root/editor/create_dialog.cpp
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2022-08-22 15:42:28 +0300
committerGitHub <noreply@github.com>2022-08-22 15:42:28 +0300
commit3cd3ec62e2c9cc7e5ae380f2e79cd32bcd337458 (patch)
tree9b04958109da75f830ebffa059b39ebb9576789e /editor/create_dialog.cpp
parent69c9d1f8e6d88947437fee0adb529c61b3109c23 (diff)
parent7ef5dfcfc3e3fd208565906e19d87d4260bfb517 (diff)
Merge pull request #37168 from theoway/ChangeNodeTypeDialog
Changed the title of change node type dialog
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r--editor/create_dialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index e6168f4924..c84e8ec48f 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -38,7 +38,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const String &p_select_type) {
+void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const String &p_select_type, const String &p_select_name) {
_fill_type_list();
icon_fallback = search_options->has_theme_icon(base_type, SNAME("EditorIcons")) ? base_type : "Object";
@@ -57,7 +57,11 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const St
_update_search();
if (p_replace_mode) {
- set_title(vformat(TTR("Change %s Type"), base_type));
+ if (!p_select_name.is_empty()) {
+ set_title(vformat(TTR("Convert %s from %s"), p_select_name, p_select_type));
+ } else {
+ set_title(vformat(TTR("Convert %s"), p_select_type));
+ }
set_ok_button_text(TTR("Change"));
} else {
set_title(vformat(TTR("Create New %s"), base_type));