diff options
| author | Juan Linietsky | 2016-01-23 18:28:30 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-01-23 18:28:30 -0300 |
| commit | 5ca338bab6d77f0c25c4321549bddd46b28e1f42 (patch) | |
| tree | 6441dbb16cdb0b17681f40222134565a924817df /tools/editor/editor_data.cpp | |
| parent | 784a3eeb90e392ca769a6be62a1a92e80a44188e (diff) | |
| download | godot-5ca338bab6d77f0c25c4321549bddd46b28e1f42.tar.gz godot-5ca338bab6d77f0c25c4321549bddd46b28e1f42.tar.zst godot-5ca338bab6d77f0c25c4321549bddd46b28e1f42.zip | |
-Fixed revert scene, should work proprely now, fixes #2782
Diffstat (limited to 'tools/editor/editor_data.cpp')
| -rw-r--r-- | tools/editor/editor_data.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp index 5e613c658..c872b1c3c 100644 --- a/tools/editor/editor_data.cpp +++ b/tools/editor/editor_data.cpp @@ -635,6 +635,16 @@ String EditorData::get_scene_type(int p_idx) const { return edited_scene[p_idx].root->get_type(); } +void EditorData::move_edited_scene_to_index(int p_idx) { + + ERR_FAIL_INDEX(current_edited_scene,edited_scene.size()); + ERR_FAIL_INDEX(p_idx,edited_scene.size()); + + EditedScene es=edited_scene[current_edited_scene]; + edited_scene.remove(current_edited_scene); + edited_scene.insert(p_idx,es); + current_edited_scene=p_idx; +} Ref<Script> EditorData::get_scene_root_script(int p_idx) const { |
