Index: trunk/src/conf_act.c =================================================================== --- trunk/src/conf_act.c (revision 24253) +++ trunk/src/conf_act.c (revision 24254) @@ -234,7 +234,7 @@ /*------------ get/chk (check flag actions for menus) ------------------*/ static const char pcb_acts_GetStyle[] = "GetStyle()" ; static const char pcb_acth_GetStyle[] = "Return integer index (>=0) of the currently active style or -1 if no style is selected (== custom style)"; -static fgw_error_t pcb_act_GetStyle(fgw_arg_t *res, int argc, fgw_arg_t *argv) +fgw_error_t pcb_act_GetStyle(fgw_arg_t *res, int argc, fgw_arg_t *argv) { PCB_ACT_IRES(pcb_route_style_lookup(&PCB->RouteStyle, conf_core.design.line_thickness, conf_core.design.via_thickness, conf_core.design.via_drilling_hole, conf_core.design.clearance, NULL)); return 0; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 24253) +++ trunk/src/plug_io.c (revision 24254) @@ -543,8 +543,12 @@ /* set route style to the first one, if the current one doesn't happen to match any. This way, "revert" won't change the route style. */ - if (pcb_hid_get_flag("GetStyle()") < 0) + { + extern fgw_error_t pcb_act_GetStyle(fgw_arg_t *res, int argc, fgw_arg_t *argv); + fgw_arg_t res, argv; + if (PCB_ACT_CALL_C(pcb_act_GetStyle, &res, 1, &argv) < 0) pcb_use_route_style_idx(&PCB->RouteStyle, 0); + } if ((how == 0) || (revert)) pcb_board_changed(revert);