Index: trunk/src_plugins/lib_hid_pcbui/routest_dlg.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 36300) +++ trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 36301) @@ -28,12 +28,13 @@ #include #include "route_style.h" +#include "data.h" typedef struct{ RND_DAD_DECL_NOINIT(dlg) int active; /* already open - allow only one instance */ int curr; - int wname, wlineth, wclr, wtxtscale, wtxtth, wfont, wproto, wattr; + int wname, wlineth, wclr, wtxtscale, wtxtth, wfont, wproto, wprotoname, wattr; rnd_hidval_t name_timer; @@ -111,6 +112,25 @@ hv.str = ""; rnd_gui->attr_dlg_set_value(rstdlg_ctx.dlg_hid_ctx, rstdlg_ctx.wproto, &hv); + if (rst->via_proto_set) { + hv.str = ""; + if ((rst->via_proto >= 0) && (rst->via_proto < PCB->Data->ps_protos.used)) { + pcb_pstk_proto_t *proto = &PCB->Data->ps_protos.array[rst->via_proto]; + if (proto->in_use) { + if ((proto->name != NULL) && (*proto->name != '\0')) + hv.str = proto->name; + else + hv.str = ""; + } + else + hv.str = ""; + } + } + else + hv.str = ""; + rnd_gui->attr_dlg_set_value(rstdlg_ctx.dlg_hid_ctx, rstdlg_ctx.wprotoname, &hv); + + rnd_dad_tree_clear(tree); for(a = rst->attr.List, n = 0; n < rst->attr.Number; a++,n++) { @@ -376,12 +396,15 @@ RND_DAD_LABEL(rstdlg_ctx.dlg, "Via padstack:"); - RND_DAD_BUTTON(rstdlg_ctx.dlg, ""); - rstdlg_ctx.wproto = RND_DAD_CURRENT(rstdlg_ctx.dlg); - RND_DAD_HELP(rstdlg_ctx.dlg, "Padstack prototype ID used for new vias with this style\n(button invokes the board padstack proto list dialog)"); - RND_DAD_CHANGE_CB(rstdlg_ctx.dlg, rst_change_cb); + RND_DAD_BEGIN_HBOX(rstdlg_ctx.dlg); + RND_DAD_BUTTON(rstdlg_ctx.dlg, ""); + rstdlg_ctx.wproto = RND_DAD_CURRENT(rstdlg_ctx.dlg); + RND_DAD_HELP(rstdlg_ctx.dlg, "Padstack prototype ID used for new vias with this style\n(button invokes the board padstack proto list dialog)"); + RND_DAD_CHANGE_CB(rstdlg_ctx.dlg, rst_change_cb); + RND_DAD_LABEL(rstdlg_ctx.dlg, ""); + rstdlg_ctx.wprotoname = RND_DAD_CURRENT(rstdlg_ctx.dlg); + RND_DAD_END(rstdlg_ctx.dlg); - RND_DAD_END(rstdlg_ctx.dlg); RND_DAD_TREE(rstdlg_ctx.dlg, 2, 0, attr_hdr); RND_DAD_HELP(rstdlg_ctx.dlg, "These attributes are automatically added to\nany object drawn with this routing style");