Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2017-05-19 16:47:47 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-05-19 16:51:09 +0300
commitb90ad0ded7d3fdcd52131122b53765bac59890cd (patch)
tree4c53f72e3a58bb800d82b91450e438b54c1c51c6 /source/blender/editors/space_outliner/outliner_collections.c
parent3af8f52752b015d11b879e2c7a57882a662855c0 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_collections.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c8
1 files changed, 0 insertions, 8 deletions
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);
}