From b90ad0ded7d3fdcd52131122b53765bac59890cd Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 19 May 2017 15:47:47 +0200 Subject: Remove redundant workaround for removing collections in outliner Collections are now identified by their pointer. Also had to correct TSE_IS_REAL_ID to fix undefined behavior on undo. --- source/blender/editors/space_outliner/outliner_collections.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_collections.c') diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c index b3d52da26d5..97b03693ca6 100644 --- a/source/blender/editors/space_outliner/outliner_collections.c +++ b/source/blender/editors/space_outliner/outliner_collections.c @@ -320,7 +320,6 @@ struct CollectionDeleteData { static TreeTraversalAction collection_delete_cb(TreeElement *te, void *customdata) { struct CollectionDeleteData *data = customdata; - TreeStoreElem *tselem = TREESTORE(te); SceneCollection *scene_collection = outliner_scene_collection_from_tree_element(te); if (!scene_collection) { @@ -332,13 +331,6 @@ static TreeTraversalAction collection_delete_cb(TreeElement *te, void *customdat * when deleting multiple collections, so just do nothing */ } else { - /* XXX removing the treestore element shouldn't be done, it makes us loose information after - * undo/file-read. We do need it here however, because non-ID elements don't have an ID pointer - * that can be used to lookup the TreeStoreElem when recreating the TreeElement. This index - * won't be correct after removing a collection from the list though. - * This works as workaround, but having a proper way to find the TreeStoreElem for a recreated - * TreeElement would be better. It could use an idname or the directdata pointer for that. */ - outliner_remove_treestore_element(data->soops, tselem); BKE_collection_remove(data->scene, scene_collection); } -- cgit v1.2.3