Index: tool_thermal.c =================================================================== --- tool_thermal.c (revision 31209) +++ tool_thermal.c (revision 31210) @@ -43,7 +43,7 @@ #include "thermal.h" #include -void pcb_tool_thermal_on_pstk(pcb_pstk_t *ps, unsigned long lid) +void pcb_tool_thermal_on_obj(pcb_any_obj_t *obj, unsigned long lid) { unsigned char *th, newth = 0; unsigned char cycle[] = { @@ -56,7 +56,7 @@ }; int cycles = sizeof(cycle) / sizeof(cycle[0]); - th = pcb_pstk_get_thermal(ps, lid, 1); + th = pcb_obj_common_get_thermal(obj, lid, 1); if (rnd_gui->shift_is_pressed(rnd_gui)) { int n, curr = -1; /* cycle through the variants to find the current one */ @@ -85,7 +85,7 @@ newth = cycle[0]; /* new thermal, use default */ } - pcb_chg_obj_thermal(PCB_OBJ_PSTK, ps, ps, ps, newth, lid); + pcb_chg_obj_thermal(obj->type, obj, obj, obj, newth, lid); } @@ -97,8 +97,12 @@ if (((type = pcb_search_screen(hl->tool_x, hl->tool_y, PCB_OBJ_CLASS_PIN, &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) && !PCB_FLAG_TEST(PCB_FLAG_HOLE, (pcb_any_obj_t *) ptr3)) { if (type == PCB_OBJ_PSTK) - pcb_tool_thermal_on_pstk((pcb_pstk_t *)ptr2, PCB_CURRLID(pcb)); + pcb_tool_thermal_on_obj(ptr2, PCB_CURRLID(pcb)); } + else if (((type = pcb_search_screen(hl->tool_x, hl->tool_y, PCB_OBJ_CLASS_REAL, &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) + && !PCB_FLAG_TEST(PCB_FLAG_HOLE, (pcb_any_obj_t *) ptr3)) { + pcb_tool_thermal_on_obj(ptr2, PCB_CURRLID(pcb)); + } } /* XPM */ Index: tool_thermal.h =================================================================== --- tool_thermal.h (revision 31209) +++ tool_thermal.h (revision 31210) @@ -3,4 +3,4 @@ void pcb_tool_thermal_notify_mode(rnd_hidlib_t *hl); /* direct call: cycle through thermal modes on a padstack - provided for tool_via.h */ -void pcb_tool_thermal_on_pstk(pcb_pstk_t *ps, unsigned long lid); +void pcb_tool_thermal_on_obj(pcb_any_obj_t *ps, unsigned long lid); Index: tool_via.c =================================================================== --- tool_via.c (revision 31209) +++ tool_via.c (revision 31210) @@ -77,7 +77,7 @@ pcb_undo_add_obj_to_create(PCB_OBJ_PSTK, ps, ps, ps); if (rnd_gui->shift_is_pressed(rnd_gui)) - pcb_tool_thermal_on_pstk(ps, PCB_CURRLID(pcb)); + pcb_tool_thermal_on_obj((pcb_any_obj_t *)ps, PCB_CURRLID(pcb)); pcb_undo_inc_serial(); pcb_pstk_invalidate_draw(ps);