Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 35911) +++ trunk/src/buffer.c (revision 35912) @@ -183,6 +183,7 @@ pcb_data_bind_board_layers(pcb, Buffer->Data, 0); } Buffer->from_outside = 0; + Buffer->from_bottom_side = 0; free(Buffer->source_path); Buffer->source_path = NULL; Buffer->X = Buffer->Y = 0; } @@ -224,6 +225,7 @@ Buffer->Y = pcb_crosshair.Y; } Buffer->from_outside = 0; + Buffer->from_bottom_side = (pcb_layer_flags(pcb, PCB_CURRLID(pcb)) & PCB_LYT_BOTTOM); free(Buffer->source_path); Buffer->source_path = NULL; rnd_hid_notify_crosshair_change(hidlib, rnd_true); } @@ -352,6 +354,7 @@ pcb_board_free(newPCB); free(newPCB); Buffer->from_outside = 0; /* always place matching top-to-top, don't swap sides only because the user is viewing the board from the bottom */ + Buffer->from_bottom_side = 0; free(Buffer->source_path); Buffer->source_path = rnd_strdup(Filename); PCB = orig; pcb_layergrp_inhibit_dec(); @@ -366,6 +369,7 @@ PCB = orig; pcb_layergrp_inhibit_dec(); Buffer->from_outside = 0; + Buffer->from_bottom_side = 0; free(Buffer->source_path); Buffer->source_path = NULL; return rnd_false; } @@ -959,6 +963,7 @@ Buffer->X = 0; Buffer->Y = 0; Buffer->from_outside = 1; + Buffer->from_bottom_side = 0; free(Buffer->source_path); Buffer->source_path = rnd_strdup(Name); if (pcb_subclist_length(&Buffer->Data->subc)) { Index: trunk/src/buffer.h =================================================================== --- trunk/src/buffer.h (revision 35911) +++ trunk/src/buffer.h (revision 35912) @@ -40,6 +40,7 @@ rnd_box_t bbox_naked; pcb_data_t *Data; /* data; not all members of pcb_board_t */ int from_outside; /* data is coming from outside of the current board (lib, loaded board) */ + int from_bottom_side; /* if buffer was picked up from while viewing the board from the bottom side */ char *source_path; /* when from the outside, this field may remember the full path of the original source file */ }; Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 35911) +++ trunk/src/obj_subc.c (revision 35912) @@ -673,7 +673,7 @@ vtp0_uninit(&mask_pads); vtp0_uninit(&paste_pads); - pcb_subc_create_aux(sc, buffer->X, buffer->Y, 0.0, rnd_false); + pcb_subc_create_aux(sc, buffer->X, buffer->Y, 0.0, !!buffer->from_bottom_side); /* Add refdes */ if ((conf_core.editor.subc_conv_refdes != NULL) && (*conf_core.editor.subc_conv_refdes != '\0')) {