Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 18015) +++ trunk/src/board.c (revision 18016) @@ -152,17 +152,17 @@ int pcb_board_new_postproc(pcb_board_t *pcb, int use_defaults) { /* copy default settings */ - pcb_layer_colors_from_conf(pcb); + pcb_layer_colors_from_conf(pcb, 0); return 0; } -void pcb_layer_colors_from_conf(pcb_board_t *ptr) +void pcb_layer_colors_from_conf(pcb_board_t *ptr, int force) { int i; /* copy default settings */ for (i = 0; i < PCB_MAX_LAYER; i++) - if ((ptr->Data->Layer[i].meta.real.color == NULL) || (ptr->Data->Layer[i].meta.real.color[0] == '\0')) { + if (force || (ptr->Data->Layer[i].meta.real.color == NULL) || (ptr->Data->Layer[i].meta.real.color[0] == '\0')) { free(ptr->Data->Layer[i].meta.real.color); ptr->Data->Layer[i].meta.real.color = pcb_strdup(pcb_layer_default_color(i, pcb_layer_flags(ptr, i))); } Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 18015) +++ trunk/src/board.h (revision 18016) @@ -114,9 +114,10 @@ /* Called after PCB->Data->LayerN is set. Returns non-zero on error */ int pcb_board_new_postproc(pcb_board_t *pcb, int use_defaults); -/* Perhaps PCB should internally just use the Settings colors? For now, - * use this to set PCB colors so the config can reassign PCB colors. */ -void pcb_layer_colors_from_conf(pcb_board_t *); +/* Set the color field of each layer that does not yet have an explicit + color, from the config, using default colors per layer type. If + force is non-zero, overwrite even existing colors. */ +void pcb_layer_colors_from_conf(pcb_board_t *pcb, int force); /* counts the number of plated and unplated holes in the design within a given area of the board. To count for the whole board, pass NULL