diff options
Diffstat (limited to 'editor/editor_data.cpp')
-rw-r--r-- | editor/editor_data.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index c62e5b75b2..5e50835ef2 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -438,6 +438,21 @@ const Vector<Callable> EditorData::get_undo_redo_inspector_hook_callback() { return undo_redo_callbacks; } +void EditorData::add_move_array_element_function(const StringName &p_class, Callable p_callable) { + move_element_functions.insert(p_class, p_callable); +} + +void EditorData::remove_move_array_element_function(const StringName &p_class) { + move_element_functions.erase(p_class); +} + +Callable EditorData::get_move_array_element_function(const StringName &p_class) const { + if (move_element_functions.has(p_class)) { + return move_element_functions[p_class]; + } + return Callable(); +} + void EditorData::remove_editor_plugin(EditorPlugin *p_plugin) { p_plugin->undo_redo = nullptr; editor_plugins.erase(p_plugin); @@ -551,6 +566,10 @@ void EditorData::remove_scene(int p_idx) { current_edited_scene--; } + if (edited_scene[p_idx].path != String()) { + ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(edited_scene[p_idx].path); + } + edited_scene.remove(p_idx); } |