From 753623d1d7ec002523a0b4ec35dc8ff1f0df8ec1 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 10 Jun 2011 14:03:51 +0000 Subject: [PATCH] Bugfix #27136 Ending localview - which is similar to layer change - should send update similar to change layers too. Needed for example when loading a file saved in local view or when changing time in localview. --- source/blender/editors/space_view3d/view3d_view.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 0c4ab161e71..aadb355f743 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1560,7 +1560,7 @@ static void restore_localviewdata(ScrArea *sa, int free) } } -static void endlocalview(Scene *scene, ScrArea *sa) +static void endlocalview(Main *bmain, Scene *scene, ScrArea *sa) { View3D *v3d= sa->spacedata.first; struct Base *base; @@ -1586,6 +1586,8 @@ static void endlocalview(Scene *scene, ScrArea *sa) base->object->lay= base->lay; } } + + DAG_on_visible_update(bmain, FALSE); } } @@ -1594,7 +1596,7 @@ static int localview_exec(bContext *C, wmOperator *UNUSED(unused)) View3D *v3d= CTX_wm_view3d(C); if(v3d->localvd) - endlocalview(CTX_data_scene(C), CTX_wm_area(C)); + endlocalview(CTX_data_main(C), CTX_data_scene(C), CTX_wm_area(C)); else initlocalview(CTX_data_main(C), CTX_data_scene(C), CTX_wm_area(C));