Additonal fix for r35724

(bugfix #26573, #26574 and #26551)

Layer visibility code for hotkeys uses different code still, added same
new DAG_on_visible_update() in this operator.
This commit is contained in:
Ton Roosendaal 2011-03-23 15:15:42 +00:00
parent 2c4999eccb
commit 9019d3b1f2

@ -152,8 +152,6 @@ static int view3d_layers_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
ScrArea *sa= CTX_wm_area(C);
View3D *v3d= sa->spacedata.first;
Base *base;
int oldlay= v3d->lay;
int nr= RNA_int_get(op->ptr, "nr");
int toggle= RNA_boolean_get(op->ptr, "toggle");
@ -211,12 +209,7 @@ static int view3d_layers_exec(bContext *C, wmOperator *op)
if(v3d->scenelock) handle_view3d_lock(C);
/* XXX new layers might need updates, there is no provision yet to detect if that's needed */
oldlay= ~oldlay & v3d->lay;
for (base= scene->base.first; base; base= base->next) {
if(base->lay & oldlay)
base->object->recalc= OB_RECALC_OB|OB_RECALC_DATA;
}
DAG_on_visible_update(CTX_data_main(C), FALSE);
ED_area_tag_redraw(sa);