| 4128 | } |
| 4129 | |
| 4130 | void 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 | |
| 4145 | void EditorNode::set_edited_scene(Node *p_scene) { |
| 4146 | set_edited_scene_root(p_scene, true); |
nothing calls this directly
no test coverage detected