fix issue with previous fix, add enable_stretch parameter to select_inside() and select_rect()
This commit is contained in:
parent
1bee3d766f
commit
01989bba0c
|
|
@ -3879,7 +3879,7 @@ void fix_restore_rect(double x1, double y1, double x2, double y2)
|
||||||
|
|
||||||
|
|
||||||
/* 20150927 select=1: select objects, select=0: unselect objects */
|
/* 20150927 select=1: select objects, select=0: unselect objects */
|
||||||
void select_rect(int what, int select)
|
void select_rect(int stretch, int what, int select)
|
||||||
{
|
{
|
||||||
int incremental_select = tclgetboolvar("incremental_select");
|
int incremental_select = tclgetboolvar("incremental_select");
|
||||||
int sel_touch = tclgetboolvar("select_touch");
|
int sel_touch = tclgetboolvar("select_touch");
|
||||||
|
|
@ -3901,7 +3901,7 @@ void select_rect(int what, int select)
|
||||||
draw_selection(xctx->gc[SELLAYER], 0);
|
draw_selection(xctx->gc[SELLAYER], 0);
|
||||||
|
|
||||||
if(!xctx->nl_sel || (incremental_select && xctx->nl_dir == 0))
|
if(!xctx->nl_sel || (incremental_select && xctx->nl_dir == 0))
|
||||||
select_inside(xctx->nl_xx1, xctx->nl_yy1, xctx->nl_xx2, xctx->nl_yy2, xctx->nl_sel);
|
select_inside(stretch, xctx->nl_xx1, xctx->nl_yy1, xctx->nl_xx2, xctx->nl_yy2, xctx->nl_sel);
|
||||||
else if(incremental_select && xctx->nl_dir == 1 && sel_touch)
|
else if(incremental_select && xctx->nl_dir == 1 && sel_touch)
|
||||||
select_touch(xctx->nl_xx1, xctx->nl_yy1, xctx->nl_xx2, xctx->nl_yy2, xctx->nl_sel);
|
select_touch(xctx->nl_xx1, xctx->nl_yy1, xctx->nl_xx2, xctx->nl_yy2, xctx->nl_sel);
|
||||||
xctx->nl_xx1=xctx->nl_xr;xctx->nl_xx2=xctx->nl_xr2;xctx->nl_yy1=xctx->nl_yr;xctx->nl_yy2=xctx->nl_yr2;
|
xctx->nl_xx1=xctx->nl_xr;xctx->nl_xx2=xctx->nl_xr2;xctx->nl_yy1=xctx->nl_yr;xctx->nl_yy2=xctx->nl_yr2;
|
||||||
|
|
@ -3935,7 +3935,7 @@ void select_rect(int what, int select)
|
||||||
drawtemprect(xctx->gctiled, NOW, xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2);
|
drawtemprect(xctx->gctiled, NOW, xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2);
|
||||||
|
|
||||||
if(!sel_touch || xctx->nl_dir == 0)
|
if(!sel_touch || xctx->nl_dir == 0)
|
||||||
select_inside(xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2, xctx->nl_sel);
|
select_inside(stretch, xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2, xctx->nl_sel);
|
||||||
else
|
else
|
||||||
select_touch(xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2, xctx->nl_sel);
|
select_touch(xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2, xctx->nl_sel);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2251,6 +2251,7 @@ int callback(const char *winpath, int event, int mx, int my, KeySym key,
|
||||||
#else
|
#else
|
||||||
XKeyboardState kbdstate;
|
XKeyboardState kbdstate;
|
||||||
#endif
|
#endif
|
||||||
|
int enable_stretch = tclgetboolvar("enable_stretch");
|
||||||
int draw_xhair = tclgetboolvar("draw_crosshair");
|
int draw_xhair = tclgetboolvar("draw_crosshair");
|
||||||
int crosshair_size = tclgetintvar("crosshair_size");
|
int crosshair_size = tclgetintvar("crosshair_size");
|
||||||
int infix_interface = tclgetboolvar("infix_interface");
|
int infix_interface = tclgetboolvar("infix_interface");
|
||||||
|
|
@ -2462,12 +2463,12 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
if( (state & Button1Mask) && SET_MODMASK) {
|
if( (state & Button1Mask) && SET_MODMASK) {
|
||||||
if(mx >= xctx->mx_save) xctx->nl_dir = 0;
|
if(mx >= xctx->mx_save) xctx->nl_dir = 0;
|
||||||
else xctx->nl_dir = 1;
|
else xctx->nl_dir = 1;
|
||||||
select_rect(RUBBER,0);
|
select_rect(enable_stretch, RUBBER,0);
|
||||||
/* select by area : determine direction */
|
/* select by area : determine direction */
|
||||||
} else if(state & Button1Mask) {
|
} else if(state & Button1Mask) {
|
||||||
if(mx >= xctx->mx_save) xctx->nl_dir = 0;
|
if(mx >= xctx->mx_save) xctx->nl_dir = 0;
|
||||||
else xctx->nl_dir = 1;
|
else xctx->nl_dir = 1;
|
||||||
select_rect(RUBBER,1);
|
select_rect(enable_stretch, RUBBER,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(xctx->ui_state & STARTMOVE) {
|
if(xctx->ui_state & STARTMOVE) {
|
||||||
|
|
@ -2492,7 +2493,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
xctx->mouse_moved = 1;
|
xctx->mouse_moved = 1;
|
||||||
if(!xctx->drag_elements) {
|
if(!xctx->drag_elements) {
|
||||||
if( !(xctx->ui_state & STARTSELECT)) {
|
if( !(xctx->ui_state & STARTSELECT)) {
|
||||||
select_rect(START,1);
|
select_rect(enable_stretch, START,1);
|
||||||
xctx->onetime=1;
|
xctx->onetime=1;
|
||||||
}
|
}
|
||||||
if(abs(mx-xctx->mx_save) > 8 ||
|
if(abs(mx-xctx->mx_save) > 8 ||
|
||||||
|
|
@ -2511,7 +2512,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
!(xctx->ui_state & STARTPAN) && !xctx->shape_point_selected &&
|
!(xctx->ui_state & STARTPAN) && !xctx->shape_point_selected &&
|
||||||
!(xctx->ui_state & (PLACE_SYMBOL | PLACE_TEXT))) { /* unselect area */
|
!(xctx->ui_state & (PLACE_SYMBOL | PLACE_TEXT))) { /* unselect area */
|
||||||
if( !(xctx->ui_state & STARTSELECT)) {
|
if( !(xctx->ui_state & STARTSELECT)) {
|
||||||
select_rect(START,0);
|
select_rect(enable_stretch, START,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Select by area. Shift pressed */
|
/* Select by area. Shift pressed */
|
||||||
|
|
@ -2520,7 +2521,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
!xctx->drag_elements && !(xctx->ui_state & STARTPAN) ) {
|
!xctx->drag_elements && !(xctx->ui_state & STARTPAN) ) {
|
||||||
if(mx != xctx->mx_save || my != xctx->my_save) {
|
if(mx != xctx->mx_save || my != xctx->my_save) {
|
||||||
if( !(xctx->ui_state & STARTSELECT)) {
|
if( !(xctx->ui_state & STARTSELECT)) {
|
||||||
select_rect(START,1);
|
select_rect(enable_stretch, START,1);
|
||||||
}
|
}
|
||||||
if(abs(mx-xctx->mx_save) > 8 ||
|
if(abs(mx-xctx->mx_save) > 8 ||
|
||||||
abs(my-xctx->my_save) > 8 ) { /* set reasonable threshold before unsel */
|
abs(my-xctx->my_save) > 8 ) { /* set reasonable threshold before unsel */
|
||||||
|
|
@ -3148,16 +3149,8 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
}
|
}
|
||||||
if(key=='y' && rstate == 0) /* toggle stretching */
|
if(key=='y' && rstate == 0) /* toggle stretching */
|
||||||
{
|
{
|
||||||
int en_s;
|
enable_stretch = !enable_stretch;
|
||||||
en_s = tclgetboolvar("enable_stretch");
|
tclsetboolvar("enable_stretch", enable_stretch);
|
||||||
en_s = !en_s;
|
|
||||||
|
|
||||||
if(en_s) {
|
|
||||||
tclsetvar("enable_stretch","1");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
tclsetvar("enable_stretch","0");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(key=='x' && EQUAL_MODMASK) /* toggle draw crosshair at mouse pos */
|
if(key=='x' && EQUAL_MODMASK) /* toggle draw crosshair at mouse pos */
|
||||||
|
|
@ -3671,8 +3664,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
waves_callback(event, mx, my, key, button, aux, state);
|
waves_callback(event, mx, my, key, button, aux, state);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(tclgetboolvar("enable_stretch"))
|
if(enable_stretch) select_attached_nets(); /* stretch nets that land on selected instance pins */
|
||||||
select_attached_nets(); /* stretch nets that land on selected instance pins */
|
|
||||||
if(infix_interface) {
|
if(infix_interface) {
|
||||||
xctx->mx_double_save=xctx->mousex_snap;
|
xctx->mx_double_save=xctx->mousex_snap;
|
||||||
xctx->my_double_save=xctx->mousey_snap;
|
xctx->my_double_save=xctx->mousey_snap;
|
||||||
|
|
@ -3707,8 +3699,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
waves_callback(event, mx, my, key, button, aux, state);
|
waves_callback(event, mx, my, key, button, aux, state);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(!tclgetboolvar("enable_stretch"))
|
if(!enable_stretch) select_attached_nets(); /* stretch nets that land on selected instance pins */
|
||||||
select_attached_nets(); /* stretch nets that land on selected instance pins */
|
|
||||||
if(infix_interface) {
|
if(infix_interface) {
|
||||||
xctx->mx_double_save=xctx->mousex_snap;
|
xctx->mx_double_save=xctx->mousex_snap;
|
||||||
xctx->my_double_save=xctx->mousey_snap;
|
xctx->my_double_save=xctx->mousey_snap;
|
||||||
|
|
@ -3724,8 +3715,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
if(key=='M' && state == (ControlMask | ShiftMask) &&
|
if(key=='M' && state == (ControlMask | ShiftMask) &&
|
||||||
!(xctx->ui_state & (STARTMOVE | STARTCOPY)))
|
!(xctx->ui_state & (STARTMOVE | STARTCOPY)))
|
||||||
{
|
{
|
||||||
if(!tclgetboolvar("enable_stretch"))
|
if(enable_stretch) select_attached_nets(); /* stretch nets that land on selected instance pins */
|
||||||
select_attached_nets(); /* stretch nets that land on selected instance pins */
|
|
||||||
xctx->connect_by_kissing = 2; /* 2 will be used to reset var to 0 at end of move */
|
xctx->connect_by_kissing = 2; /* 2 will be used to reset var to 0 at end of move */
|
||||||
if(infix_interface) {
|
if(infix_interface) {
|
||||||
xctx->mx_double_save=xctx->mousex_snap;
|
xctx->mx_double_save=xctx->mousex_snap;
|
||||||
|
|
@ -4187,7 +4177,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
/* xctx->push_undo(); */
|
/* xctx->push_undo(); */
|
||||||
xctx->drag_elements = 1;
|
xctx->drag_elements = 1;
|
||||||
|
|
||||||
if( (state & ControlMask) && !(state & ShiftMask) && !tclgetboolvar("enable_stretch")) {
|
if( (state & ControlMask) && !(state & ShiftMask) && !enable_stretch) {
|
||||||
select_attached_nets(); /* stretch nets that land on selected instance pins */
|
select_attached_nets(); /* stretch nets that land on selected instance pins */
|
||||||
}
|
}
|
||||||
if(state == (ShiftMask | ControlMask) ) {
|
if(state == (ShiftMask | ControlMask) ) {
|
||||||
|
|
@ -4286,14 +4276,11 @@ int rstate; /* (reduced state, without ShiftMask) */
|
||||||
if(xctx->semaphore >= 2) break;
|
if(xctx->semaphore >= 2) break;
|
||||||
if(xctx->ui_state & STARTSELECT) {
|
if(xctx->ui_state & STARTSELECT) {
|
||||||
if(state & ControlMask) {
|
if(state & ControlMask) {
|
||||||
int es = tclgetboolvar("enable_stretch");
|
select_rect(!enable_stretch, END,-1);
|
||||||
tclsetboolvar("enable_stretch", !es);
|
|
||||||
select_rect(END,-1);
|
|
||||||
tclsetboolvar("enable_stretch", es);
|
|
||||||
} else {
|
} else {
|
||||||
/* Button1 release: end of rectangle select */
|
/* Button1 release: end of rectangle select */
|
||||||
if(!(state & (Button4Mask|Button5Mask) ) ) {
|
if(!(state & (Button4Mask|Button5Mask) ) ) {
|
||||||
select_rect(END,-1);
|
select_rect(enable_stretch, END,-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rebuild_selected_array();
|
rebuild_selected_array();
|
||||||
|
|
|
||||||
|
|
@ -378,14 +378,14 @@ static void find_closest_box(double mx ,double my, int override_lock)
|
||||||
int i, c, r=-1, col = 0;
|
int i, c, r=-1, col = 0;
|
||||||
|
|
||||||
/* correction for very small boxes */
|
/* correction for very small boxes */
|
||||||
double min = MINOR(xctx->rect[c][i].x2 - xctx->rect[c][i].x1,
|
|
||||||
xctx->rect[c][i].y2 - xctx->rect[c][i].y1);
|
|
||||||
ds = (ds * 8 <= min ) ? ds : min / 8;
|
|
||||||
for(c=0;c<cadlayers; ++c)
|
for(c=0;c<cadlayers; ++c)
|
||||||
{
|
{
|
||||||
if(!xctx->enable_layer[c]) continue;
|
if(!xctx->enable_layer[c]) continue;
|
||||||
for(i=0;i<xctx->rects[c]; ++i)
|
for(i=0;i<xctx->rects[c]; ++i)
|
||||||
{
|
{
|
||||||
|
double min = MINOR(xctx->rect[c][i].x2 - xctx->rect[c][i].x1,
|
||||||
|
xctx->rect[c][i].y2 - xctx->rect[c][i].y1);
|
||||||
|
ds = (xctx->cadhalfdotsize * 8 <= min ) ? xctx->cadhalfdotsize : min / 8;
|
||||||
if( POINTINSIDE(mx, my, xctx->rect[c][i].x1 - ds, xctx->rect[c][i].y1 - ds,
|
if( POINTINSIDE(mx, my, xctx->rect[c][i].x1 - ds, xctx->rect[c][i].y1 - ds,
|
||||||
xctx->rect[c][i].x2 + ds, xctx->rect[c][i].y2 + ds) )
|
xctx->rect[c][i].x2 + ds, xctx->rect[c][i].y2 + ds) )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ void compile_font(void)
|
||||||
for(code=0;code<127;code++)
|
for(code=0;code<127;code++)
|
||||||
{
|
{
|
||||||
unselect_all(1);
|
unselect_all(1);
|
||||||
select_inside(code*FONTOFFSET-1,-FONTHEIGHT-1,
|
select_inside(0, code*FONTOFFSET-1,-FONTHEIGHT-1,
|
||||||
code*FONTOFFSET+FONTWIDTH+1,FONTWHITESPACE + FONTDESCENT+1, 1);
|
code*FONTOFFSET+FONTWIDTH+1,FONTWHITESPACE + FONTDESCENT+1, 1);
|
||||||
rebuild_selected_array();
|
rebuild_selected_array();
|
||||||
character[code] = my_calloc(_ALLOC_ID_, xctx->lastsel*4+1, sizeof(double));
|
character[code] = my_calloc(_ALLOC_ID_, xctx->lastsel*4+1, sizeof(double));
|
||||||
|
|
|
||||||
|
|
@ -5018,7 +5018,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
y1 = atof(argv[3]);
|
y1 = atof(argv[3]);
|
||||||
x2 = atof(argv[4]);
|
x2 = atof(argv[4]);
|
||||||
y2 = atof(argv[5]);
|
y2 = atof(argv[5]);
|
||||||
select_inside(x1, y1, x2, y2, sel);
|
select_inside(tclgetboolvar("enable_stretch"), x1, y1, x2, y2, sel);
|
||||||
Tcl_ResetResult(interp);
|
Tcl_ResetResult(interp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
28
src/select.c
28
src/select.c
|
|
@ -1298,20 +1298,18 @@ void select_attached_nets(void)
|
||||||
rebuild_selected_array();
|
rebuild_selected_array();
|
||||||
}
|
}
|
||||||
|
|
||||||
void select_inside(double x1,double y1, double x2, double y2, int sel) /*added unselect (sel param) */
|
void select_inside(int stretch, double x1,double y1, double x2, double y2, int sel)
|
||||||
{
|
{
|
||||||
int c,i, tmpint;
|
int c,i, tmpint;
|
||||||
double x, y, r, a, b, xa, ya, xb, yb; /* arc */
|
double x, y, r, a, b, xa, ya, xb, yb; /* arc */
|
||||||
double xx1,yy1,xx2,yy2, dtmp;
|
double xx1,yy1,xx2,yy2, dtmp;
|
||||||
xRect tmp;
|
xRect tmp;
|
||||||
int en_s;
|
|
||||||
int select_rot = 0, select_flip = 0;
|
int select_rot = 0, select_flip = 0;
|
||||||
#if HAS_CAIRO==1
|
#if HAS_CAIRO==1
|
||||||
int customfont;
|
int customfont;
|
||||||
#endif
|
#endif
|
||||||
char *estr = NULL;
|
char *estr = NULL;
|
||||||
|
|
||||||
en_s = tclgetboolvar("enable_stretch");
|
|
||||||
for(i=0;i<xctx->wires; ++i)
|
for(i=0;i<xctx->wires; ++i)
|
||||||
{
|
{
|
||||||
if(sel) {
|
if(sel) {
|
||||||
|
|
@ -1320,12 +1318,12 @@ void select_inside(double x1,double y1, double x2, double y2, int sel) /*added u
|
||||||
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
||||||
select_wire(i, SELECTED, 1);
|
select_wire(i, SELECTED, 1);
|
||||||
}
|
}
|
||||||
else if(en_s && POINTINSIDE(xctx->wire[i].x1,xctx->wire[i].y1, x1,y1,x2,y2) )
|
else if(stretch && POINTINSIDE(xctx->wire[i].x1,xctx->wire[i].y1, x1,y1,x2,y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION;
|
xctx->ui_state |= SELECTION;
|
||||||
select_wire(i, SELECTED1, 1);
|
select_wire(i, SELECTED1, 1);
|
||||||
}
|
}
|
||||||
else if(en_s && POINTINSIDE(xctx->wire[i].x2,xctx->wire[i].y2, x1,y1,x2,y2) )
|
else if(stretch && POINTINSIDE(xctx->wire[i].x2,xctx->wire[i].y2, x1,y1,x2,y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION;
|
xctx->ui_state |= SELECTION;
|
||||||
select_wire(i, SELECTED2, 1);
|
select_wire(i, SELECTED2, 1);
|
||||||
|
|
@ -1412,7 +1410,7 @@ void select_inside(double x1,double y1, double x2, double y2, int sel) /*added u
|
||||||
select_polygon(c, i, SELECTED, 1);
|
select_polygon(c, i, SELECTED, 1);
|
||||||
} else if(selected_points) {
|
} else if(selected_points) {
|
||||||
/* for polygon, SELECTED1 means partial sel */
|
/* for polygon, SELECTED1 means partial sel */
|
||||||
if(sel && en_s) select_polygon(c, i, SELECTED1,1);
|
if(sel && stretch) select_polygon(c, i, SELECTED1,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1425,12 +1423,12 @@ void select_inside(double x1,double y1, double x2, double y2, int sel) /*added u
|
||||||
xctx->ui_state |= SELECTION;
|
xctx->ui_state |= SELECTION;
|
||||||
select_line(c,i,SELECTED,1);
|
select_line(c,i,SELECTED,1);
|
||||||
}
|
}
|
||||||
else if(en_s && POINTINSIDE(xctx->line[c][i].x1,xctx->line[c][i].y1, x1,y1,x2,y2) )
|
else if(stretch && POINTINSIDE(xctx->line[c][i].x1,xctx->line[c][i].y1, x1,y1,x2,y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
||||||
select_line(c, i,SELECTED1,1);
|
select_line(c, i,SELECTED1,1);
|
||||||
}
|
}
|
||||||
else if(en_s && POINTINSIDE(xctx->line[c][i].x2,xctx->line[c][i].y2, x1,y1,x2,y2) )
|
else if(stretch && POINTINSIDE(xctx->line[c][i].x2,xctx->line[c][i].y2, x1,y1,x2,y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION;
|
xctx->ui_state |= SELECTION;
|
||||||
select_line(c, i,SELECTED2,1);
|
select_line(c, i,SELECTED2,1);
|
||||||
|
|
@ -1458,17 +1456,17 @@ void select_inside(double x1,double y1, double x2, double y2, int sel) /*added u
|
||||||
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
||||||
sel? select_arc(c, i, SELECTED,1): select_arc(c, i, 0,1);
|
sel? select_arc(c, i, SELECTED,1): select_arc(c, i, 0,1);
|
||||||
}
|
}
|
||||||
else if( sel && en_s && POINTINSIDE(x, y, x1, y1, x2, y2) )
|
else if( sel && stretch && POINTINSIDE(x, y, x1, y1, x2, y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
||||||
select_arc(c, i,SELECTED1,1);
|
select_arc(c, i,SELECTED1,1);
|
||||||
}
|
}
|
||||||
else if( sel && en_s && POINTINSIDE(xb, yb, x1, y1, x2, y2) )
|
else if( sel && stretch && POINTINSIDE(xb, yb, x1, y1, x2, y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
||||||
select_arc(c, i,SELECTED3,1);
|
select_arc(c, i,SELECTED3,1);
|
||||||
}
|
}
|
||||||
else if( sel && en_s && POINTINSIDE(xa, ya, x1, y1, x2, y2) )
|
else if( sel && stretch && POINTINSIDE(xa, ya, x1, y1, x2, y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
xctx->ui_state |= SELECTION; /* set xctx->ui_state to SELECTION also if unselecting by area ???? */
|
||||||
select_arc(c, i,SELECTED2,1);
|
select_arc(c, i,SELECTED2,1);
|
||||||
|
|
@ -1490,22 +1488,22 @@ void select_inside(double x1,double y1, double x2, double y2, int sel) /*added u
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(c != GRIDLAYER || !(xctx->rect[c][i].flags & 2048)){ /* no stretch on unscaled images */
|
else if(c != GRIDLAYER || !(xctx->rect[c][i].flags & 2048)){ /* no stretch on unscaled images */
|
||||||
if( sel && en_s && POINTINSIDE(xctx->rect[c][i].x1,xctx->rect[c][i].y1, x1,y1,x2,y2) )
|
if( sel && stretch && POINTINSIDE(xctx->rect[c][i].x1,xctx->rect[c][i].y1, x1,y1,x2,y2) )
|
||||||
{ /*20070302 added stretch select */
|
{ /*20070302 added stretch select */
|
||||||
xctx->ui_state |= SELECTION;
|
xctx->ui_state |= SELECTION;
|
||||||
select_box(c, i,SELECTED1,1, 0);
|
select_box(c, i,SELECTED1,1, 0);
|
||||||
}
|
}
|
||||||
if( sel && en_s && POINTINSIDE(xctx->rect[c][i].x2,xctx->rect[c][i].y1, x1,y1,x2,y2) )
|
if( sel && stretch && POINTINSIDE(xctx->rect[c][i].x2,xctx->rect[c][i].y1, x1,y1,x2,y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION;
|
xctx->ui_state |= SELECTION;
|
||||||
select_box(c, i,SELECTED2,1, 0);
|
select_box(c, i,SELECTED2,1, 0);
|
||||||
}
|
}
|
||||||
if( sel && en_s && POINTINSIDE(xctx->rect[c][i].x1,xctx->rect[c][i].y2, x1,y1,x2,y2) )
|
if( sel && stretch && POINTINSIDE(xctx->rect[c][i].x1,xctx->rect[c][i].y2, x1,y1,x2,y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION;
|
xctx->ui_state |= SELECTION;
|
||||||
select_box(c, i,SELECTED3,1, 0);
|
select_box(c, i,SELECTED3,1, 0);
|
||||||
}
|
}
|
||||||
if( sel && en_s && POINTINSIDE(xctx->rect[c][i].x2,xctx->rect[c][i].y2, x1,y1,x2,y2) )
|
if( sel && stretch && POINTINSIDE(xctx->rect[c][i].x2,xctx->rect[c][i].y2, x1,y1,x2,y2) )
|
||||||
{
|
{
|
||||||
xctx->ui_state |= SELECTION;
|
xctx->ui_state |= SELECTION;
|
||||||
select_box(c, i,SELECTED4,1, 0);
|
select_box(c, i,SELECTED4,1, 0);
|
||||||
|
|
|
||||||
|
|
@ -1382,7 +1382,7 @@ extern Selected select_object(double mx,double my, unsigned short sel_mode,
|
||||||
extern int set_first_sel(unsigned short type, int n, unsigned int col);
|
extern int set_first_sel(unsigned short type, int n, unsigned int col);
|
||||||
extern void unselect_all(int dr);
|
extern void unselect_all(int dr);
|
||||||
extern void select_attached_nets(void);
|
extern void select_attached_nets(void);
|
||||||
extern void select_inside(double x1,double y1, double x2, double y2, int sel);
|
extern void select_inside(int stretch, double x1,double y1, double x2, double y2, int sel);
|
||||||
extern void select_touch(double x1,double y1, double x2, double y2, int sel);
|
extern void select_touch(double x1,double y1, double x2, double y2, int sel);
|
||||||
/* Select all nets that are dangling, ie not attached to any non pin/port/probe components */
|
/* Select all nets that are dangling, ie not attached to any non pin/port/probe components */
|
||||||
extern int select_dangling_nets(void);
|
extern int select_dangling_nets(void);
|
||||||
|
|
@ -1545,7 +1545,7 @@ extern void pan(int what, int mx, int my);
|
||||||
extern void zoom_rectangle(int what);
|
extern void zoom_rectangle(int what);
|
||||||
extern void zoom_box(double x1, double y1, double x2, double y2, double factor);
|
extern void zoom_box(double x1, double y1, double x2, double y2, double factor);
|
||||||
extern void save_restore_zoom(int save, Zoom_info *zi);
|
extern void save_restore_zoom(int save, Zoom_info *zi);
|
||||||
extern void select_rect(int what, int select);
|
extern void select_rect(int stretch, int what, int select);
|
||||||
extern void new_rect(int what, double mousex_snap, double mousey_snap);
|
extern void new_rect(int what, double mousex_snap, double mousey_snap);
|
||||||
extern void new_polygon(int what, double mousex_snap, double mousey_snap);
|
extern void new_polygon(int what, double mousex_snap, double mousey_snap);
|
||||||
extern void compile_font(void);
|
extern void compile_font(void);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue