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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-30 13:16:11 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-30 13:16:11 +0300
commitd269ef87451accd915ec74ef9489101d41fb728f (patch)
tree64ddd1ed76acf85bcf5434282106855b7daa96b4 /source/blender/editors/space_view3d/space_view3d.c
parent91882d3ba171870b0d11a87db87f9a1b7e2e5aca (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/space_view3d.c')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c13
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;