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:
authorTon Roosendaal <ton@blender.org>2008-12-14 20:25:46 +0300
committerTon Roosendaal <ton@blender.org>2008-12-14 20:25:46 +0300
commit131fa2e00c35ff78042a4f793891eaeb880d715c (patch)
tree381cf85e2aaa9f5c821805f1c7fd39e3c681f838 /source/blender/editors
parent8be23f94902a9338c5fad1d826a69bfb4be3630c (diff)
2.5
Fix for crash on joining (previously splitted) areas. Reason was the stored regions in pushed 'spaces' not being copied. next: free running handlers on area join/split.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/ED_screen.h1
-rw-r--r--source/blender/editors/screen/area.c19
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c4
4 files changed, 7 insertions, 19 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 7292cc87366..2cb394da2b0 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -46,7 +46,6 @@ void ED_region_do_draw(struct bContext *C, struct ARegion *ar);
void ED_region_exit(struct bContext *C, struct ARegion *ar);
void ED_region_pixelspace(const struct bContext *C, struct ARegion *ar);
void ED_region_init(struct bContext *C, struct ARegion *ar);
-ARegion *ED_region_copy(ARegion *ar);
/* spaces */
void ED_spacetypes_init(void);
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 066b110e457..fc6ed8cee54 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -431,21 +431,6 @@ void ED_region_init(bContext *C, ARegion *ar)
}
-ARegion *ED_region_copy(ARegion *ar)
-{
- ARegion *newar= MEM_dupallocN(ar);
-
- newar->handlers.first= newar->handlers.last= NULL;
- newar->uiblocks.first= newar->uiblocks.last= NULL;
- newar->swinid= 0;
-
- /* XXX regiondata */
- if(ar->regiondata)
- newar->regiondata= MEM_dupallocN(ar->regiondata);
-
- return newar;
-}
-
/* sa2 to sa1, we swap spaces for fullscreen to keep all allocated data */
/* area vertices were set */
void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
@@ -485,11 +470,11 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
}
}
- /* regions */
+ /* regions... XXX */
BLI_freelistN(&sa1->regionbase);
for(ar= sa2->regionbase.first; ar; ar= ar->next) {
- ARegion *newar= ED_region_copy(ar);
+ ARegion *newar= BKE_area_region_copy(ar);
BLI_addtail(&sa1->regionbase, newar);
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index e36e843b846..9a96edf243c 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1208,7 +1208,7 @@ void ED_SCR_OT_repeat_last(wmOperatorType *ot)
/* insert a region in the area region list */
static int region_split_exec(bContext *C, wmOperator *op)
{
- ARegion *newar= ED_region_copy(C->region);
+ ARegion *newar= BKE_area_region_copy(C->region);
int dir= RNA_enum_get(op->ptr, "dir");
BLI_insertlinkafter(&C->area->regionbase, C->region, newar);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index b53e5ce427d..923710d22b3 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -548,6 +548,10 @@ static SpaceLink *outliner_duplicate(SpaceLink *sl)
if(soutlinern->rnapath)
soutlinern->rnapath= MEM_dupallocN(soutlinern->rnapath);
+ soutlinern->oops.first= soutlinern->oops.last= NULL;
+ soutlinern->tree.first= soutlinern->tree.last= NULL;
+ soutlinern->treestore= NULL;
+
return (SpaceLink *)soutlinern;
}