diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-30 13:16:11 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-30 13:16:11 +0300 |
commit | d269ef87451accd915ec74ef9489101d41fb728f (patch) | |
tree | 64ddd1ed76acf85bcf5434282106855b7daa96b4 /source/blender/editors/space_view3d | |
parent | 91882d3ba171870b0d11a87db87f9a1b7e2e5aca (diff) |
Possible fix for #20835: background images were not duplicated correctly
when splitting 3d view, causing them to be lost on file reload.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index b4c81ecf3e1..a65521cd0fb 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -290,6 +290,7 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) { View3D *v3do= (View3D *)sl; View3D *v3dn= MEM_dupallocN(sl); + BGpic *bgpic; /* clear or remove stuff from old */ @@ -304,13 +305,11 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) /* copy or clear inside new stuff */ - if(v3dn->bgpicbase.first) { - BGpic *bgpic; - for ( bgpic= v3dn->bgpicbase.first; bgpic; bgpic= bgpic->next ) { - bgpic= MEM_dupallocN(bgpic); - if(bgpic->ima) bgpic->ima->id.us++; - } - } + BLI_duplicatelist(&v3dn->bgpicbase, &v3do->bgpicbase); + for(bgpic= v3dn->bgpicbase.first; bgpic; bgpic= bgpic->next) + if(bgpic->ima) + bgpic->ima->id.us++; + v3dn->properties_storage= NULL; return (SpaceLink *)v3dn; |