diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-18 04:48:24 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-18 04:48:24 +0300 |
commit | 241dbe6e85a916cc55b5e749596aaf0ef3dffd90 (patch) | |
tree | 79c3275b0be16208300b258e7154cafa779d4bb9 | |
parent | 7a5186c53f12c772abb692e831d15baebe958445 (diff) |
2.5: Fix crash moving area to fullscreen with tooltips. Happened
because C->window->screen and C->screen were different, now made
sure they are set at the same time.
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 3fc582a901b..fbcd27cf263 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -406,8 +406,6 @@ bScreen *screen_add(wmWindow *win, char *name) sc->scene= G.scene; sc->do_refresh= 1; - win->screen= sc; - sv1= screen_addvert(sc, 0, 0); sv2= screen_addvert(sc, 0, win->sizey-1); sv3= screen_addvert(sc, win->sizex-1, win->sizey-1); @@ -902,6 +900,8 @@ bScreen *ED_screen_duplicate(wmWindow *win, bScreen *sc) newsc= screen_add(win, sc->id.name+2); /* copy all data */ screen_copy(newsc, sc); + /* set in window */ + win->screen= newsc; return newsc; } @@ -1229,7 +1229,7 @@ void ed_screen_fullarea(bContext *C) C->screen->full = SCREENFULL; oldscreen= C->screen; - sc= screen_add(C->window, "temp"); /* sets C->window->screen! */ + sc= screen_add(C->window, "temp"); /* returns the top small area */ newa= area_split(C->window, sc, (ScrArea *)sc->areabase.first, 'h', 0.99f); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index efcedc800b1..c4011550a07 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -258,6 +258,7 @@ static int screen_area_rip_op(bContext *C, wmOperator *op) /* allocs new screen and adds to newly created window, using window size */ newsc= screen_add(win, C->screen->id.name+2); + win->screen= newsc; /* copy area to new screen */ area_copy_data((ScrArea *)newsc->areabase.first, C->area, 0); |