Index: trunk/src_plugins/drc_query/dlg.c =================================================================== --- trunk/src_plugins/drc_query/dlg.c (revision 30284) +++ trunk/src_plugins/drc_query/dlg.c (revision 30285) @@ -286,7 +286,7 @@ dis = drc_get_disable(row->cell[0]); if (dis == NULL) { - pcb_message(PCB_MSG_ERROR, "internal error: no disable conf node for %s\n", row->cell[2]); + pcb_message(PCB_MSG_ERROR, "internal error: no disable conf node for %s\n", row->cell[0]); return; } @@ -294,6 +294,21 @@ drc_rlist_pcb2dlg(); } +static void rlist_btn_edit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +{ + drc_rlist_ctx_t *ctx = caller_data; + pcb_hid_row_t *row = pcb_dad_tree_get_selected(&(ctx->dlg[ctx->wlist])); + conf_role_t role; + + role = pcb_conf_role_parse(row->cell[1]); + if (role == CFR_invalid) { + pcb_message(PCB_MSG_ERROR, "internal error: invalid role %s\n", row->cell[0]); + return; + } + + pcb_dlg_rule_edit(role, row->cell[0]); +} + static int pcb_dlg_drc_rlist(void) { const char *lst_hdr[] = {"rule name", "role", "disabled", NULL}; @@ -317,6 +332,7 @@ PCB_DAD_BEGIN_HBOX(drc_rlist_ctx.dlg); PCB_DAD_BUTTON(drc_rlist_ctx.dlg, "Run"); PCB_DAD_BUTTON(drc_rlist_ctx.dlg, "Edit..."); + PCB_DAD_CHANGE_CB(drc_rlist_ctx.dlg, rlist_btn_edit_cb); PCB_DAD_BUTTON(drc_rlist_ctx.dlg, "Toggle disable"); PCB_DAD_CHANGE_CB(drc_rlist_ctx.dlg, rlist_btn_toggle_cb); PCB_DAD_END(drc_rlist_ctx.dlg);