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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 48aa0471c9..b51524b299 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -434,7 +434,10 @@ String RenameDialog::_substitute(const String &subject, const Node *node, int co
}
int current = EditorNode::get_singleton()->get_editor_data().get_edited_scene();
- result = result.replace("${SCENE}", EditorNode::get_singleton()->get_editor_data().get_scene_title(current));
+ // Always request the scene title with the extension stripped.
+ // Otherwise, the result could vary depending on whether a scene with the same name
+ // (but different extension) is currently open.
+ result = result.replace("${SCENE}", EditorNode::get_singleton()->get_editor_data().get_scene_title(current, true));
Node *root_node = SceneTree::get_singleton()->get_edited_scene_root();
if (root_node) {