Fix local view editing broken after changing object's layer from non-local view
[blender.git] / source / blender / editors / object / object_relations.c
index 52fc07f386756900bf2bfceb8477f33aa22844dd..d5c7632765fd8de16b9a0e35782017dfa0b6992f 100644 (file)
@@ -1382,7 +1382,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
                        /* upper byte is used for local view */
                        local = base->lay & 0xFF000000;
                        base->lay = lay + local;
-                       base->object->lay = lay;
+                       base->object->lay = base->lay;
                        /* if (base->object->type == OB_LAMP) is_lamp = true; */
                }
                CTX_DATA_END;