diff options
Diffstat (limited to 'editor/rename_dialog.cpp')
-rw-r--r-- | editor/rename_dialog.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index 858b14a733..cc9e14975f 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -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; } |