MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _remove_scene

Method _remove_scene

editor/editor_node.cpp:4130–4143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4128}
4129
4130void EditorNode::_remove_scene(int index, bool p_change_tab) {
4131 /// Clear icon cache in case some scripts are no longer needed or class icons are outdated.
4132 /// @todo FIXME: Ideally the cache should never be cleared and only updated on per-script basis, when an icon changes.
4133 editor_data.clear_script_icon_cache();
4134 class_icon_cache.clear();
4135
4136 if (editor_data.get_edited_scene() == index) {
4137 // Scene to remove is current scene.
4138 _remove_edited_scene(p_change_tab);
4139 } else {
4140 // Scene to remove is not active scene.
4141 editor_data.remove_scene(index);
4142 }
4143}
4144
4145void EditorNode::set_edited_scene(Node *p_scene) {
4146 set_edited_scene_root(p_scene, true);

Callers

nothing calls this directly

Calls 4

remove_sceneMethod · 0.80
clearMethod · 0.45
get_edited_sceneMethod · 0.45

Tested by

no test coverage detected