first selected instance is now always the master (instead of the first in the xschem array order) when doing an edit attribute on a group of selected elements

This commit is contained in:
stefan schippers 2023-10-04 17:15:52 +02:00
parent 9ecc5859b2
commit 0204b7596b
12 changed files with 125 additions and 50 deletions

View File

@ -121,7 +121,7 @@ name="mchanged_name" model=\"nmos\" w="20u" l="3u" m="10"
<img src="component_properties0.png">
<li><kbd>lock</kbd></li>
<p> A <kbd>lock=true</kbd> attribute will make the symbol not editable. the only way to make it editable again is
to right click on it to bring up the edit attributes dialog box and set to false. This is useful for title
to double click on it to bring up the edit attributes dialog box and set to false. This is useful for title
symbols. </p>
<li><kbd>hide</kbd></li>
<p> A <kbd>hide=true</kbd> attribute will only display the symbol bounding box.</p>

View File

@ -2733,6 +2733,7 @@ int rstate; /* (reduced state, without ShiftMask) */
tcleval("set edit_symbol_prop_new_sel 1; .dialog.f1.b1 invoke"); /* invoke 'OK' of edit prop dialog */
} else if(button==Button1 && (state & ShiftMask) && tclgetvar("edit_symbol_prop_new_sel")[0]) {
select_object(xctx->mousex, xctx->mousey, SELECTED, 0);
tclsetvar("preserve_unchanged_attrs", "1");
rebuild_selected_array();
}
}

View File

@ -645,6 +645,7 @@ void break_wires_at_pins(int remove)
xctx->wire[xctx->wires].end1 = xctx->wire[i].end1;
xctx->wire[xctx->wires].end2 = 1;
xctx->wire[xctx->wires].sel=SELECTED;
set_first_sel(WIRE, xctx->wires, 0);
xctx->wire[xctx->wires].prop_ptr=NULL;
my_strdup(_ALLOC_ID_, &xctx->wire[xctx->wires].prop_ptr, xctx->wire[i].prop_ptr);
if(!strboolcmp(get_tok_value(xctx->wire[xctx->wires].prop_ptr,"bus",0), "true"))

View File

@ -1304,7 +1304,7 @@ static int edit_text_property(int x)
}
/* x=0 use text widget x=1 use vim editor */
static int update_symbol(const char *result, int x, int first_sel)
static int update_symbol(const char *result, int x, int selected_inst)
{
int k, sym_number;
int no_change_props=0;
@ -1320,8 +1320,8 @@ static int update_symbol(const char *result, int x, int first_sel)
int *netl_com = &xctx->netlist_commands; /* static var */
int generator = 0,floaters, modified = 0;
dbg(1, "update_symbol(): entering\n");
*ii=xctx->sel_array[first_sel].n;
dbg(1, "update_symbol(): entering, selected_inst = %d\n", selected_inst);
*ii = selected_inst;
if(!result) {
dbg(1, "update_symbol(): edit symbol prop aborted\n");
my_free(_ALLOC_ID_, &xctx->old_prop);
@ -1531,7 +1531,7 @@ static int edit_symbol_property(int x, int first_sel)
my_strdup(_ALLOC_ID_, &result, tclresult());
}
dbg(1, "edit_symbol_property(): before update_symbol, modified=%d\n", xctx->modified);
modified = update_symbol(result, x, first_sel);
modified = update_symbol(result, x, *ii);
my_free(_ALLOC_ID_, &result);
dbg(1, "edit_symbol_property(): done update_symbol, modified=%d\n", modified);
*ii=-1;
@ -1783,11 +1783,23 @@ void edit_property(int x)
tclsetvar("preserve_unchanged_attrs", "0");
}
type = xctx->sel_array[0].type;
for(j=0; j < xctx->lastsel; j++) {
if(xctx->sel_array[j].type == ELEMENT) {
type = ELEMENT;
break;
/* retrieve first selected element (if still selected)... */
if(xctx->first_sel.n >=0 && xctx->first_sel.type == ELEMENT &&
xctx->inst[xctx->first_sel.n].sel == SELECTED) {
type = ELEMENT;
for(j=0; j < xctx->lastsel; j++) {
if(xctx->sel_array[j].type == ELEMENT && xctx->sel_array[j].n == xctx->first_sel.n) {
break;
}
}
/* ... otherwise get first from sel_array[] list */
} else {
type = xctx->sel_array[0].type;
for(j=0; j < xctx->lastsel; j++) {
if(xctx->sel_array[j].type == ELEMENT) {
type = ELEMENT;
break;
}
}
}

View File

@ -748,6 +748,7 @@ int search(const char *tok, const char *val, int sub, int sel, int match_case)
}
if(sel==1) {
xctx->inst[i].sel = SELECTED;
set_first_sel(ELEMENT, i, 0);
xctx->need_reb_sel_arr=1;
}
if(sel==-1) { /* 20171211 unselect */
@ -775,6 +776,7 @@ int search(const char *tok, const char *val, int sub, int sel, int match_case)
}
if(sel==1) {
xctx->wire[i].sel = SELECTED;
set_first_sel(WIRE, i, 0);
xctx->need_reb_sel_arr=1;
}
if(sel==-1) {
@ -802,6 +804,7 @@ int search(const char *tok, const char *val, int sub, int sel, int match_case)
{
if(sel==1) {
xctx->line[c][i].sel = SELECTED;
set_first_sel(LINE, i, c);
xctx->need_reb_sel_arr=1;
}
if(sel==-1) {
@ -829,6 +832,7 @@ int search(const char *tok, const char *val, int sub, int sel, int match_case)
{
if(sel==1) {
xctx->rect[c][i].sel = SELECTED;
set_first_sel(xRECT, i, c);
xctx->need_reb_sel_arr=1;
}
if(sel==-1) {
@ -1853,6 +1857,7 @@ void select_hilight_net(void)
for(i=0;i<xctx->wires; ++i) {
if( (entry = bus_hilight_hash_lookup(xctx->wire[i].node, 0, XLOOKUP)) ) {
xctx->wire[i].sel = SELECTED;
set_first_sel(WIRE, i, 0);
}
}
for(i=0;i<xctx->instances; ++i) {
@ -1863,6 +1868,7 @@ void select_hilight_net(void)
if( xctx->inst[i].color != -10000) {
dbg(1, "select_hilight_net(): instance %d flags & HILIGHT_CONN true\n", i);
xctx->inst[i].sel = SELECTED;
set_first_sel(ELEMENT, i, 0);
}
else if(hilight_connected_inst) {
int rects, j;
@ -1872,6 +1878,7 @@ void select_hilight_net(void)
entry=bus_hilight_hash_lookup(xctx->inst[i].node[j], 0, XLOOKUP);
if(entry) {
xctx->inst[i].sel = SELECTED;
set_first_sel(ELEMENT, i, 0);
break;
}
}
@ -1879,7 +1886,10 @@ void select_hilight_net(void)
}
} else if( type && xctx->inst[i].node && IS_LABEL_SH_OR_PIN(type) ) {
entry=bus_hilight_hash_lookup(xctx->inst[i].node[0], 0, XLOOKUP);
if(entry) xctx->inst[i].sel = SELECTED;
if(entry) {
xctx->inst[i].sel = SELECTED;
set_first_sel(ELEMENT, i, 0);
}
}
}
xctx->need_reb_sel_arr = 1;

View File

@ -89,8 +89,10 @@ void rebuild_selected_array() /* can be used only if new selected set is lower *
xctx->sel_array[xctx->lastsel++].col = c;
}
}
if(xctx->lastsel==0) xctx->ui_state &= ~SELECTION;
else xctx->ui_state |= SELECTION;
if(xctx->lastsel==0) {
xctx->ui_state &= ~SELECTION;
set_first_sel(0, -1, 0);
} else xctx->ui_state |= SELECTION;
xctx->need_reb_sel_arr=0;
}
@ -718,7 +720,7 @@ void copy_objects(int what)
int l, firstw, firsti;
int floaters = there_are_floaters();
set_first_sel(0, -1, 0); /* reset first selected object */
if(xctx->connect_by_kissing == 2) xctx->connect_by_kissing = 0;
if(!floaters) bbox(START, 0.0 , 0.0 , 0.0 , 0.0);
@ -968,6 +970,7 @@ void copy_objects(int what)
xctx->text[xctx->texts].rot=(xctx->text[n].rot +
( (xctx->move_flip && (xctx->text[n].rot & 1) ) ? xctx->move_rot+2 : xctx->move_rot) ) & 0x3;
xctx->text[xctx->texts].flip=xctx->move_flip^xctx->text[n].flip;
set_first_sel(xTEXT, xctx->texts, 0);
xctx->text[xctx->texts].sel=SELECTED;
xctx->text[xctx->texts].prop_ptr=NULL;
xctx->text[xctx->texts].font=NULL;
@ -1037,6 +1040,7 @@ void copy_objects(int what)
xctx->inst[xctx->instances].color = -10000;
xctx->inst[xctx->instances].x0 = xctx->rx1+xctx->deltax;
xctx->inst[xctx->instances].y0 = xctx->ry1+xctx->deltay;
set_first_sel(ELEMENT, xctx->instances, 0);
xctx->inst[xctx->instances].sel = SELECTED;
xctx->inst[xctx->instances].rot = (xctx->inst[xctx->instances].rot + ( (xctx->move_flip &&
(xctx->inst[xctx->instances].rot & 1) ) ? xctx->move_rot+2 : xctx->move_rot) ) & 0x3;

View File

@ -1352,6 +1352,7 @@ int warning_overlapped_symbols(int sel)
xctx->hilight_nets=1;
} else {
xctx->inst[i].sel = SELECTED;
set_first_sel(ELEMENT, i, 0);
xctx->need_reb_sel_arr = 1;
}
my_snprintf(str, S(str), "Error: overlapped instance found: %s(%s) -> %s\n",

View File

@ -1009,11 +1009,17 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
}
break;
case 'f':
if(!strcmp(argv[2], "fix_broken_tiled_fill")) { /* get drawing method setting (for broken GPUs) */
if(!strcmp(argv[2], "first_sel")) { /* get data about first selected object */
char res[40];
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
my_snprintf(res, S(res), "%hu %d %u", xctx->first_sel.type, xctx->first_sel.n, xctx->first_sel.col);
Tcl_SetResult(interp, res, TCL_VOLATILE);
}
else if(!strcmp(argv[2], "fix_broken_tiled_fill")) { /* get drawing method setting (for broken GPUs) */
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
Tcl_SetResult(interp, my_itoa(fix_broken_tiled_fill),TCL_VOLATILE);
}
if(!strcmp(argv[2], "format")) { /* alternate format attribute to use in netlist (or NULL) */
else if(!strcmp(argv[2], "format")) { /* alternate format attribute to use in netlist (or NULL) */
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
if(!xctx->format ) Tcl_SetResult(interp, "<NULL>",TCL_STATIC);
else Tcl_SetResult(interp, xctx->format,TCL_VOLATILE);
@ -1845,14 +1851,19 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
rebuild_selected_array();
for(n=0; user_inst >=0 || n < xctx->lastsel; ++n) {
if(user_inst >=0 || xctx->sel_array[n].type == ELEMENT) {
char srot[16], sflip[16], sx0[70], sy0[70];
if(user_inst == -1) i = xctx->sel_array[n].n;
x0 = xctx->inst[i].x0;
y0 = xctx->inst[i].y0;
rot = xctx->inst[i].rot;
flip = xctx->inst[i].flip;
symbol = xctx->sym + xctx->inst[i].ptr;
my_snprintf(srot, S(srot), "%d", rot);
my_snprintf(sflip, S(sflip), "%d", flip);
my_snprintf(sx0, S(sx0), "%g", x0);
my_snprintf(sy0, S(sy0), "%g", y0);
Tcl_AppendResult(interp, "{", xctx->inst[i].instname, "} ", "{", symbol->name, "} ",
dtoa(x0), " ", dtoa(y0), " ", my_itoa(rot), " ", my_itoa(flip), "\n", NULL);
sx0, " ", sy0, " ", srot, " ", sflip, "\n", NULL);
if(user_inst >= 0) break;
}
}

View File

@ -655,6 +655,7 @@ void delete(int to_push_undo)
draw();
if(!floaters) bbox(END , 0.0 , 0.0 , 0.0 , 0.0);
xctx->ui_state &= ~SELECTION;
set_first_sel(0, -1, 0);
}
void delete_only_rect_line_arc_poly(void)
@ -694,6 +695,7 @@ void delete_only_rect_line_arc_poly(void)
draw();
bbox(END , 0.0 , 0.0 , 0.0 , 0.0);
xctx->ui_state &= ~SELECTION;
set_first_sel(0, -1, 0);
}
@ -812,6 +814,19 @@ void bbox(int what,double x1,double y1, double x2, double y2)
}
}
void set_first_sel(unsigned short type, int n, unsigned int col)
{
if(n == -1) { /* reset first_sel */
xctx->first_sel.type = 0;
xctx->first_sel.n = -1;
xctx->first_sel.col = 0;
}else if(xctx->first_sel.n == -1) {
xctx->first_sel.type = type;
xctx->first_sel.n = n;
xctx->first_sel.col = col;
}
}
void unselect_all(int dr)
{
int i,c;
@ -822,24 +837,24 @@ void unselect_all(int dr)
dbg(1, "unselect_all(1): start\n");
xctx->ui_state = 0;
xctx->lastsel = 0;
for(i=0;i<xctx->wires; ++i)
set_first_sel(0, -1, 0);
for(i=0;i<xctx->wires; ++i)
{
if(xctx->wire[i].sel)
{
if(xctx->wire[i].sel)
xctx->wire[i].sel = 0;
{
xctx->wire[i].sel = 0;
{
if(dr) {
if(xctx->wire[i].bus)
drawtempline(xctx->gctiled, THICK, xctx->wire[i].x1, xctx->wire[i].y1,
xctx->wire[i].x2, xctx->wire[i].y2);
else
drawtempline(xctx->gctiled, ADD, xctx->wire[i].x1, xctx->wire[i].y1,
xctx->wire[i].x2, xctx->wire[i].y2);
}
}
if(dr) {
if(xctx->wire[i].bus)
drawtempline(xctx->gctiled, THICK, xctx->wire[i].x1, xctx->wire[i].y1,
xctx->wire[i].x2, xctx->wire[i].y2);
else
drawtempline(xctx->gctiled, ADD, xctx->wire[i].x1, xctx->wire[i].y1,
xctx->wire[i].x2, xctx->wire[i].y2);
}
}
}
}
for(i=0;i<xctx->instances; ++i)
{
if(xctx->inst[i].sel == SELECTED)
@ -953,10 +968,12 @@ void select_wire(int i,unsigned short select_mode, int fast)
statusmsg(str,1);
}
if( ((xctx->wire[i].sel|select_mode) == (SELECTED1|SELECTED2)) ||
((xctx->wire[i].sel == SELECTED) && select_mode) )
xctx->wire[i].sel = SELECTED;
else
xctx->wire[i].sel = select_mode;
((xctx->wire[i].sel == SELECTED) && select_mode) ) {
xctx->wire[i].sel = SELECTED;
} else {
xctx->wire[i].sel = select_mode;
}
if( xctx->wire[i].sel == SELECTED) set_first_sel(WIRE, i, 0);
if(select_mode) {
dbg(1, "select(): wire[%d].end1=%d, ,end2=%d\n", i, xctx->wire[i].end1, xctx->wire[i].end2);
if(xctx->wire[i].bus)
@ -1011,6 +1028,7 @@ void select_element(int i,unsigned short select_mode, int fast, int override_loc
statusmsg(str,1);
}
xctx->inst[i].sel = select_mode;
if(select_mode == SELECTED) set_first_sel(ELEMENT, i, 0);
if(select_mode) {
for(c=0;c<cadlayers; ++c) {
draw_temp_symbol(ADD, xctx->gc[SELLAYER], i,c,0,0,0.0,0.0);
@ -1039,20 +1057,20 @@ void select_text(int i,unsigned short select_mode, int fast)
statusmsg(str,1);
}
xctx->text[i].sel = select_mode;
#if HAS_CAIRO==1
customfont = set_text_custom_font(&xctx->text[i]);
#endif
if(select_mode)
if(select_mode) {
set_first_sel(xTEXT, i, 0);
draw_temp_string(xctx->gc[SELLAYER],ADD, get_text_floater(i),
xctx->text[i].rot, xctx->text[i].flip, xctx->text[i].hcenter, xctx->text[i].vcenter,
xctx->text[i].x0, xctx->text[i].y0,
xctx->text[i].xscale, xctx->text[i].yscale);
else
xctx->text[i].rot, xctx->text[i].flip, xctx->text[i].hcenter, xctx->text[i].vcenter,
xctx->text[i].x0, xctx->text[i].y0,
xctx->text[i].xscale, xctx->text[i].yscale);
} else
draw_temp_string(xctx->gctiled,NOW, get_text_floater(i),
xctx->text[i].rot, xctx->text[i].flip, xctx->text[i].hcenter, xctx->text[i].vcenter,
xctx->text[i].x0, xctx->text[i].y0,
xctx->text[i].xscale, xctx->text[i].yscale);
xctx->text[i].rot, xctx->text[i].flip, xctx->text[i].hcenter, xctx->text[i].vcenter,
xctx->text[i].x0, xctx->text[i].y0,
xctx->text[i].xscale, xctx->text[i].yscale);
#if HAS_CAIRO==1
if(customfont) {
cairo_restore(xctx->cairo_ctx);
@ -1098,7 +1116,8 @@ void select_box(int c, int i, unsigned short select_mode, int fast, int override
}
if( xctx->rect[c][i].sel == (SELECTED1|SELECTED2|SELECTED3|SELECTED4)) xctx->rect[c][i].sel = SELECTED;
if(xctx->rect[c][i].sel == SELECTED) set_first_sel(xRECT, i, c);
xctx->need_reb_sel_arr=1;
}
@ -1127,6 +1146,7 @@ void select_arc(int c, int i, unsigned short select_mode, int fast)
xctx->arc[c][i].sel = 0;
drawtemparc(xctx->gctiled, NOW, xctx->arc[c][i].x, xctx->arc[c][i].y,
xctx->arc[c][i].r, xctx->arc[c][i].a, xctx->arc[c][i].b);
if(xctx->arc[c][i].sel == SELECTED) set_first_sel(ARC, i, c);
}
/*if( xctx->arc[c][i].sel == (SELECTED1|SELECTED2|SELECTED3|SELECTED4)) xctx->arc[c][i].sel = SELECTED; */
@ -1154,6 +1174,7 @@ void select_polygon(int c, int i, unsigned short select_mode, int fast )
}
else
drawtemppolygon(xctx->gctiled, NOW, xctx->poly[c][i].x, xctx->poly[c][i].y, xctx->poly[c][i].points);
if(xctx->poly[c][i].sel == SELECTED) set_first_sel(POLYGON, i, c);
xctx->need_reb_sel_arr=1;
}
@ -1175,10 +1196,12 @@ void select_line(int c, int i, unsigned short select_mode, int fast )
statusmsg(str,1);
}
if( ((xctx->line[c][i].sel|select_mode) == (SELECTED1|SELECTED2)) ||
((xctx->line[c][i].sel == SELECTED) && select_mode) )
xctx->line[c][i].sel = SELECTED;
else
xctx->line[c][i].sel = select_mode;
((xctx->line[c][i].sel == SELECTED) && select_mode) ) {
xctx->line[c][i].sel = SELECTED;
} else {
xctx->line[c][i].sel = select_mode;
}
if(xctx->line[c][i].sel == SELECTED) set_first_sel(LINE, i, c);
if(select_mode) {
if(xctx->line[c][i].bus)
drawtempline(xctx->gc[SELLAYER], THICK, xctx->line[c][i].x1, xctx->line[c][i].y1,

View File

@ -152,6 +152,7 @@ void store_arc(int pos, double x, double y, double r, double a, double b,
xctx->arc[rectc][n].prop_ptr = NULL;
my_strdup(_ALLOC_ID_, &xctx->arc[rectc][n].prop_ptr, prop_ptr);
xctx->arc[rectc][n].sel = sel;
if(sel == SELECTED) set_first_sel(ARC, n, rectc);
if( !strboolcmp(get_tok_value(xctx->arc[rectc][n].prop_ptr,"fill",0),"true") )
xctx->arc[rectc][n].fill =1;
else
@ -197,7 +198,7 @@ void store_poly(int pos, double *x, double *y, int points, unsigned int rectc,
}
xctx->poly[rectc][n].points = points;
xctx->poly[rectc][n].sel = sel;
if(sel == SELECTED) set_first_sel(POLYGON, n, rectc);
if( !strboolcmp(get_tok_value(xctx->poly[rectc][n].prop_ptr,"fill",0),"true") )
xctx->poly[rectc][n].fill =1;
@ -241,6 +242,7 @@ int storeobject(int pos, double x1,double y1,double x2,double y2,
xctx->line[rectc][n].prop_ptr=NULL;
my_strdup(_ALLOC_ID_, &xctx->line[rectc][n].prop_ptr, prop_ptr);
xctx->line[rectc][n].sel=sel;
if(sel == SELECTED) set_first_sel(LINE, n, rectc);
if( prop_ptr && !strboolcmp(get_tok_value(prop_ptr, "bus", 0), "true") )
xctx->line[rectc][n].bus = 1;
else
@ -274,6 +276,7 @@ int storeobject(int pos, double x1,double y1,double x2,double y2,
xctx->rect[rectc][n].extraptr=NULL;
my_strdup(_ALLOC_ID_, &xctx->rect[rectc][n].prop_ptr, prop_ptr);
xctx->rect[rectc][n].sel=sel;
if(sel == SELECTED) set_first_sel(xRECT, n, rectc);
if(prop_ptr && (dash = get_tok_value(prop_ptr,"dash",0))[0]) {
int d = atoi(dash);
xctx->rect[rectc][n].dash = (char) (d >= 0 ? d : 0);
@ -316,6 +319,7 @@ int storeobject(int pos, double x1,double y1,double x2,double y2,
if(prop_ptr && !strboolcmp(get_tok_value(prop_ptr,"bus",0), "true")) xctx->wire[n].bus=1;
else xctx->wire[n].bus=0;
xctx->wire[n].sel=sel;
if(sel == SELECTED) set_first_sel(WIRE, n, 0);
xctx->wires++;
modified = 1;
}

View File

@ -603,6 +603,9 @@ static void alloc_xschem_data(const char *top_path, const char *win_path)
xctx->lines=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int));
xctx->maxsel=MAXGROUP;
xctx->sel_array=my_calloc(_ALLOC_ID_, xctx->maxsel, sizeof(Selected));
xctx->first_sel.n = -1;
xctx->first_sel.type = 0;
xctx->first_sel.col = 0;
xctx->biggridpoint=(XSegment*)my_calloc(_ALLOC_ID_, CADMAXGRIDPOINTS,sizeof(XSegment));
xctx->gridpoint=(XPoint*)my_calloc(_ALLOC_ID_, CADMAXGRIDPOINTS,sizeof(XPoint));
xctx->enable_drill = 0;
@ -782,6 +785,7 @@ int compare_schematics(const char *f)
dbg(1, "schematic 2 instance %d: %s mismatch or not found in schematic 1\n", i,
xctx->inst[i].instname ? xctx->inst[i].instname : "");
xctx->inst[i].sel = SELECTED;
set_first_sel(ELEMENT, i, 0);
xctx->need_reb_sel_arr=1;
ret = 1;
}
@ -798,6 +802,7 @@ int compare_schematics(const char *f)
dbg(1, "schematic 2 net %d: %s mismatch or not found in schematic 1\n", i,
xctx->wire[i].prop_ptr ? xctx->wire[i].prop_ptr : "");
xctx->wire[i].sel = SELECTED;
set_first_sel(WIRE, i, 0);
xctx->need_reb_sel_arr=1;
ret = 1;
}
@ -825,6 +830,7 @@ int compare_schematics(const char *f)
found = int_hash_lookup(&table2, s, i, XLOOKUP);
if(!found) {
xctx->inst[i].sel = SELECTED;
set_first_sel(ELEMENT, i, 0);
xctx->need_reb_sel_arr=1;
ret = 1;
}

View File

@ -884,6 +884,7 @@ typedef struct {
int lastsel;
int maxsel;
Selected *sel_array;
Selected first_sel; /* first selected instance (used as master when editing multile pbjects) */
int prep_net_structs;
int prep_hi_structs;
int prep_hash_inst;
@ -1273,6 +1274,7 @@ extern int text_bbox_nocairo(const char * str,double xscale, double yscale,
extern Selected select_object(double mx,double my, unsigned short sel_mode,
int override_lock); /* return type 20160503 */
extern void set_first_sel(unsigned short type, int n, unsigned int col);
extern void unselect_all(int dr);
extern void select_attached_nets(void);
extern void select_inside(double x1,double y1, double x2, double y2, int sel);