Index: trunk/src/hid_helper.c =================================================================== --- trunk/src/hid_helper.c (revision 18263) +++ trunk/src/hid_helper.c (revision 18264) @@ -260,12 +260,22 @@ int offs, has_offs; pcb_layer_type_t lyt; pcb_layergrp_id_t gids[PCB_MAX_LAYERGRP]; + pcb_virt_layer_t *vl; if (parse_layer_type(curr, &lyt, &offs, &has_offs) != 0) goto err; + vl = pcb_vlayer_get_first(lyt); + if (vl == NULL) { + + } + else { + int vid = vl->new_id - PCB_LYT_VIRTUAL - 1; + dst->vgrp_vis[vid] = 1; + } + pcb_message(PCB_MSG_ERROR, "layer group not found: '%s' %x offs=%d has=%d\n", curr, lyt, offs, has_offs); - goto err; +/* goto err;*/ } } @@ -291,12 +301,24 @@ int pcb_cam_set_layer_group_(pcb_cam_t *cam, pcb_layergrp_id_t group, unsigned int flags) { + pcb_virt_layer_t *vl; + if (!cam->active) return 0; - if (group == -1) - return 1; - if (!cam->grp_vis[group]) - return 1; + + vl = pcb_vlayer_get_first(flags); + if (vl == NULL) { + if (group == -1) + return 1; + + if (!cam->grp_vis[group]) + return 1; + } + else { + int vid = vl->new_id - PCB_LYT_VIRTUAL - 1; + return !cam->vgrp_vis[vid]; + } + return 0; } Index: trunk/src/hid_helper.h =================================================================== --- trunk/src/hid_helper.h (revision 18263) +++ trunk/src/hid_helper.h (revision 18264) @@ -27,7 +27,8 @@ /* public */ const char *fn; pcb_bool active; - int grp_vis[PCB_MAX_LAYERGRP]; /* whether a layer group should be rendered */ + int grp_vis[PCB_MAX_LAYERGRP]; /* whether a real layer group should be rendered */ + int vgrp_vis[PCB_VLY_end]; /* whether a virtual layer group should be rendered */ /* private/internal/cache */ char *inst;