Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 8690) +++ trunk/src/layer.c (revision 8691) @@ -442,7 +442,7 @@ lp->SelectedColor = conf_core.appearance.color.layer_selected[idx]; } -int pcb_layer_move(pcb_layer_id_t old_index, pcb_layer_id_t new_index) +int pcb_layer_move(pcb_layer_id_t old_index, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp) { pcb_layer_id_t l; Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 8690) +++ trunk/src/layer.h (revision 8691) @@ -213,7 +213,7 @@ /* index is 0..PCB_MAX_LAYER-1. If old_index is -1, a new layer is inserted at that index. If new_index is -1, the specified layer is deleted. Returns non-zero on error, zero if OK. */ -int pcb_layer_move(pcb_layer_id_t old_index, pcb_layer_id_t new_index); +int pcb_layer_move(pcb_layer_id_t old_index, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp); /* list of virtual layers: these are generated by the draw code but do not Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 8690) +++ trunk/src/layer_grp.c (revision 8691) @@ -394,7 +394,7 @@ pcb_layer_t *l = pcb_get_layer(stk->grp[gid].lid[n]); if (l != NULL) { if (del_layers) { - pcb_layer_move(stk->grp[gid].lid[n], -1); + pcb_layer_move(stk->grp[gid].lid[n], -1, -1); n = -1; /* restart counting because the layer remove code may have changed the order */ } else { Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 8690) +++ trunk/src/object_act.c (revision 8691) @@ -1109,7 +1109,7 @@ } } - if (pcb_layer_move(old_index, new_index)) + if (pcb_layer_move(old_index, new_index, -1)) return 1; return 0; Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 8690) +++ trunk/src/undo.c (revision 8691) @@ -819,7 +819,7 @@ l->new_index = l->old_index; l->old_index = tmp; - if (pcb_layer_move(l->old_index, l->new_index)) + if (pcb_layer_move(l->old_index, l->new_index, -1)) return pcb_false; else return pcb_true;