Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 22624) +++ trunk/src/buffer.c (revision 22625) @@ -703,6 +703,7 @@ } if (changed) { + pcb_subc_as_board_update(PCB); pcb_draw(); pcb_undo_inc_serial(); } Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 22624) +++ trunk/src/obj_subc.c (revision 22625) @@ -365,6 +365,19 @@ return layer; } +void pcb_subc_as_board_update(pcb_board_t *pcb) +{ + pcb_subc_t *sc; + + if (!pcb->is_footprint) + return; + sc = pcb_subclist_first(&pcb->Data->subc); + if (sc == NULL) + return; + + pcb_subc_bbox(sc); +} + static pcb_coord_t read_mask(pcb_any_obj_t *obj) { const char *smask = pcb_attribute_get(&obj->Attributes, "elem_smash_pad_mask"); Index: trunk/src/obj_subc.h =================================================================== --- trunk/src/obj_subc.h (revision 22624) +++ trunk/src/obj_subc.h (revision 22625) @@ -135,6 +135,10 @@ the subc (if alloc is true) or return the brd_layer. */ pcb_layer_t *pcb_loose_subc_layer(pcb_board_t *pcb, pcb_layer_t *brd_layer, pcb_bool alloc); +/* Update the bounding box of the subc being edited as board; if the + board is not a subc, this call is a NOP */ +void pcb_subc_as_board_update(pcb_board_t *pcb); + /* Returns whether there's no object in the subc */ pcb_bool pcb_subc_is_empty(pcb_subc_t *subc); Index: trunk/src/route.c =================================================================== --- trunk/src/route.c (revision 22624) +++ trunk/src/route.c (revision 22625) @@ -510,6 +510,9 @@ if (apply_to_line != NULL) pcb_line_destroy(apply_to_line_layer, apply_to_line); + if (applied) + pcb_subc_as_board_update(PCB); + return applied; } @@ -630,6 +633,9 @@ if (apply_to_arc != NULL) pcb_arc_destroy(apply_to_arc_layer, apply_to_arc); + if (applied) + pcb_subc_as_board_update(PCB); + return applied; } Index: trunk/src/tool_arc.c =================================================================== --- trunk/src/tool_arc.c (revision 22624) +++ trunk/src/tool_arc.c (revision 22625) @@ -119,6 +119,7 @@ pcb_undo_inc_serial(); pcb_added_lines++; pcb_arc_invalidate_draw(CURRENT, arc); + pcb_subc_as_board_update(PCB); pcb_draw(); pcb_crosshair.AttachedBox.State = PCB_CH_STATE_THIRD; } Index: trunk/src/tool_line.c =================================================================== --- trunk/src/tool_line.c (revision 22624) +++ trunk/src/tool_line.c (revision 22625) @@ -290,6 +290,7 @@ pcb_crosshair.AttachedLine.Point1.Y = pcb_crosshair.AttachedLine.Point2.Y; pcb_undo_inc_serial(); last_layer = CURRENT; + pcb_subc_as_board_update(PCB); } if (conf_core.editor.line_refraction && (pcb_tool_note.X != pcb_crosshair.AttachedLine.Point2.X || pcb_tool_note.Y != pcb_crosshair.AttachedLine.Point2.Y) && (line = @@ -316,6 +317,7 @@ if (conf_core.editor.swap_start_direction) { conf_setf(CFR_DESIGN,"editor/line_refraction", -1, "%d",conf_core.editor.line_refraction ^ 3); } + pcb_subc_as_board_update(PCB); } if (conf_core.editor.orthogonal_moves) { /* set the mark to the new starting point so ortho works as expected and we can draw a perpendicular line from here */ Index: trunk/src/tool_rectangle.c =================================================================== --- trunk/src/tool_rectangle.c (revision 22624) +++ trunk/src/tool_rectangle.c (revision 22625) @@ -87,6 +87,7 @@ /* reset state to 'first corner' */ pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; + pcb_subc_as_board_update(PCB); } } Index: trunk/src/tool_text.c =================================================================== --- trunk/src/tool_text.c (revision 22624) +++ trunk/src/tool_text.c (revision 22625) @@ -62,6 +62,7 @@ pcb_undo_add_obj_to_create(PCB_OBJ_TEXT, CURRENT, text, text); pcb_undo_inc_serial(); pcb_text_invalidate_draw(CURRENT, text); + pcb_subc_as_board_update(PCB); pcb_draw(); } }