aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/editor_node.cpp
diff options
context:
space:
mode:
authorvolzhs2016-05-23 22:27:58 +0900
committerRémi Verschelde2016-06-04 22:20:02 +0200
commit4478f8cfbb0b7f182958bb11df3a5f87ca52a3b5 (patch)
tree9bbdfc886b670cf6aa813d559173d3dfa10dd625 /tools/editor/editor_node.cpp
parent5ad050be2bdd62b962efdaac0ab2a2be49599f27 (diff)
downloadgodot-4478f8cfbb0b7f182958bb11df3a5f87ca52a3b5.tar.gz
godot-4478f8cfbb0b7f182958bb11df3a5f87ca52a3b5.tar.zst
godot-4478f8cfbb0b7f182958bb11df3a5f87ca52a3b5.zip
use node name as filename when save scene
fix #4723 (cherry picked from commit 9e1ee568a6683fcd9a0f97d00da892d47eb5e8ec)
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r--tools/editor/editor_node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 11726512b..ecb9b30d5 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -2125,7 +2125,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
String existing;
if (extensions.size()) {
- existing="new_scene."+extensions.front()->get().to_lower();
+ String root_name(get_edited_scene()->get_name());
+ existing=root_name+"."+extensions.front()->get().to_lower();
}
file->set_current_path(existing);