diff options
author | Ton Roosendaal <ton@blender.org> | 2011-03-31 21:14:31 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-03-31 21:14:31 +0400 |
commit | 5d02ce8a7bc1bfd8010b2ad0d521886dc27fabd2 (patch) | |
tree | 793092fe7288b1b99b3825e70779d5058ea6fbe7 | |
parent | cd9b42871c34e4d694bc508ed2bd5dd50f88c223 (diff) |
Bugfix #26687
Using "New scene" operator was setting the screen->scene pointer
after the undo-push, messing up redos or undos immediate after.
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index afda6c5088f..bff92df430c 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3162,6 +3162,7 @@ static void SCREEN_OT_delete(wmOperatorType *ot) static int scene_new_exec(bContext *C, wmOperator *op) { Scene *newscene, *scene= CTX_data_scene(C); + bScreen *screen= CTX_wm_screen(C); Main *bmain= CTX_data_main(C); int type= RNA_enum_get(op->ptr, "type"); @@ -3180,8 +3181,12 @@ static int scene_new_exec(bContext *C, wmOperator *op) } } + /* this notifier calls ED_screen_set_scene, doing a lot of UI stuff, not for inside event loops */ WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, newscene); + if(screen) + screen->scene= newscene; + return OPERATOR_FINISHED; } |