summaryrefslogtreecommitdiff
path: root/editor/rename_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/rename_dialog.cpp')
-rw-r--r--editor/rename_dialog.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index ed1eec95dc..cc9e14975f 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -113,7 +113,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
collapse_theme->set_icon("unchecked", "CheckBox", collapse_theme->get_icon("GuiTreeArrowRight", "EditorIcons"));
CheckBox *chk_collapse_features = memnew(CheckBox);
- chk_collapse_features->set_text(TTR("Advanced options"));
+ chk_collapse_features->set_text(TTR("Advanced Options"));
chk_collapse_features->set_theme(collapse_theme);
chk_collapse_features->set_focus_mode(FOCUS_NONE);
vbc->add_child(chk_collapse_features);
@@ -131,7 +131,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
vbc_substitute->set_name(TTR("Substitute"));
tabc_features->add_child(vbc_substitute);
- cbut_substitute = memnew(CheckButton);
+ cbut_substitute = memnew(CheckBox);
cbut_substitute->set_text(TTR("Substitute"));
vbc_substitute->add_child(cbut_substitute);
@@ -246,7 +246,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
vbc_regex->set_custom_minimum_size(Size2(0, feature_min_height));
tabc_features->add_child(vbc_regex);
- cbut_regex = memnew(CheckButton);
+ cbut_regex = memnew(CheckBox);
cbut_regex->set_text(TTR("Regular Expressions"));
vbc_regex->add_child(cbut_regex);
@@ -258,7 +258,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
vbc_process->set_custom_minimum_size(Size2(0, feature_min_height));
tabc_features->add_child(vbc_process);
- cbut_process = memnew(CheckButton);
+ cbut_process = memnew(CheckBox);
cbut_process->set_text(TTR("Post-Process"));
vbc_process->add_child(cbut_process);
@@ -475,17 +475,17 @@ String RenameDialog::_substitute(const String &subject, const Node *node, int co
if (root_node) {
result = result.replace("${ROOT}", root_node->get_name());
}
-
- Node *parent_node = node->get_parent();
- if (parent_node) {
- if (node == root_node) {
- // Can not substitute parent of root.
- result = result.replace("${PARENT}", "");
- } else {
- result = result.replace("${PARENT}", parent_node->get_name());
+ if (node) {
+ Node *parent_node = node->get_parent();
+ if (parent_node) {
+ if (node == root_node) {
+ // Can not substitute parent of root.
+ result = result.replace("${PARENT}", "");
+ } else {
+ result = result.replace("${PARENT}", parent_node->get_name());
+ }
}
}
-
return result;
}