merge from trunk r37405
[blender.git] / source / blender / editors / space_view3d / view3d_view.c
index 32e8ae81f9095d31aef2345a0aa56ed35a88db93..6c2c4cfad131fd97e7d835437f0cfcf39b315135 100644 (file)
@@ -1557,7 +1557,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;
@@ -1583,6 +1583,8 @@ static void endlocalview(Scene *scene, ScrArea *sa)
                                base->object->lay= base->lay;
                        }
                }
+               
+               DAG_on_visible_update(bmain, FALSE);
        } 
 }
 
@@ -1591,7 +1593,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));