diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-19 21:50:35 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-19 21:50:35 +0300 |
commit | c3434c8d6154e39b37f7b5f3298b340958c926c0 (patch) | |
tree | f03f59fe6873e34c6febdc39e31ad4ccc0eff41e | |
parent | 33ab2636df06df6cce66cd75fce1417bd508a85b (diff) |
2.5
Bugfix for previous View3D split commit: on file read, the area-
spacetypes are not set yet, needs BKE_spacetype_from_id() there.
-rw-r--r-- | source/blender/editors/screen/area.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 4acbe360ab4..bd274c90a71 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -597,6 +597,7 @@ void ED_region_init(bContext *C, ARegion *ar) /* area vertices were set */ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space) { + SpaceType *st; ARegion *ar; sa1->headertype= sa2->headertype; @@ -615,12 +616,14 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space) } /* regions */ + st= BKE_spacetype_from_id(sa1->spacetype); for(ar= sa1->regionbase.first; ar; ar= ar->next) - BKE_area_region_free(sa1->type, ar); + BKE_area_region_free(st, ar); BLI_freelistN(&sa1->regionbase); + st= BKE_spacetype_from_id(sa2->spacetype); for(ar= sa2->regionbase.first; ar; ar= ar->next) { - ARegion *newar= BKE_area_region_copy(sa2->type, ar); + ARegion *newar= BKE_area_region_copy(st, ar); BLI_addtail(&sa1->regionbase, newar); } |