| 1219 | } |
| 1220 | |
| 1221 | void EditorSelection::add_node(Node *p_node) { |
| 1222 | ERR_FAIL_NULL(p_node); |
| 1223 | ERR_FAIL_COND(!p_node->is_inside_tree()); |
| 1224 | if (selection.has(p_node)) { |
| 1225 | return; |
| 1226 | } |
| 1227 | |
| 1228 | changed = true; |
| 1229 | node_list_changed = true; |
| 1230 | Object *meta = nullptr; |
| 1231 | for (Object *E : editor_plugins) { |
| 1232 | meta = E->call("_get_editor_data", p_node); |
| 1233 | if (meta) { |
| 1234 | break; |
| 1235 | } |
| 1236 | } |
| 1237 | selection[p_node] = meta; |
| 1238 | |
| 1239 | p_node->connect(SceneStringName(tree_exiting), callable_mp(this, &EditorSelection::_node_removed).bind(p_node), CONNECT_ONE_SHOT); |
| 1240 | } |
| 1241 | |
| 1242 | void EditorSelection::remove_node(Node *p_node) { |
| 1243 | ERR_FAIL_NULL(p_node); |
no test coverage detected