Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 20869) +++ trunk/src/layer_grp.c (revision 20870) @@ -563,6 +563,29 @@ #define LAYER_IS_OUTLINE(idx) ((pcb->Data->Layer[idx].name != NULL) && ((strcmp(pcb->Data->Layer[idx].name, "route") == 0 || strcmp(pcb->Data->Layer[(idx)].name, "outline") == 0))) + +void pcb_layergrp_fix_old_outline_detect(pcb_board_t *pcb, pcb_layergrp_t *g) +{ + int n, converted = 0; + + for(n = 0; n < g->len; n++) { + if (g->lid[n] < 0) + continue; + if (LAYER_IS_OUTLINE(g->lid[n])) { + if (!converted) { + pcb_layergrp_fix_turn_to_outline(g); + converted = 1; + break; + } + } + } + + if (converted) { + for(n = 0; n < g->len; n++) + pcb->Data->Layer[g->lid[n]].comb = PCB_LYC_AUTO; + } +} + int pcb_layer_parse_group_string(pcb_board_t *pcb, const char *grp_str, int LayerN, int oldfmt) { const char *s, *start; Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 20869) +++ trunk/src/layer_grp.h (revision 20870) @@ -222,6 +222,8 @@ /* ugly hack: turn an old intern layer group into an outline group after realizing it is really an outline (reading the old layers) */ void pcb_layergrp_fix_turn_to_outline(pcb_layergrp_t *g); +/* ugly hack: look at layers and convert g into an outline group if needed */ +void pcb_layergrp_fix_old_outline_detect(pcb_board_t *pcb, pcb_layergrp_t *g); /* Cached layer group lookups foir a few common cases */