removed tcl variable connect_by_kissing (to many options is a mess)
This commit is contained in:
parent
14a674b6f4
commit
5df9347533
|
|
@ -2245,7 +2245,7 @@ int draw_xhair = tclgetboolvar("draw_crosshair");
|
|||
{
|
||||
xctx->mx_double_save=xctx->mousex_snap;
|
||||
xctx->my_double_save=xctx->mousey_snap;
|
||||
tclsetintvar("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 */
|
||||
/* select_attached_nets(); */ /* stretch nets that land on selected instance pins */
|
||||
move_objects(START,0,0,0);
|
||||
break;
|
||||
|
|
@ -2265,7 +2265,7 @@ int draw_xhair = tclgetboolvar("draw_crosshair");
|
|||
!(xctx->ui_state & (STARTMOVE | STARTCOPY)))
|
||||
{
|
||||
if(xctx->semaphore >= 2) break;
|
||||
tclsetintvar("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 */
|
||||
xctx->mx_double_save=xctx->mousex_snap;
|
||||
xctx->my_double_save=xctx->mousey_snap;
|
||||
copy_objects(START);
|
||||
|
|
|
|||
16
src/move.c
16
src/move.c
|
|
@ -658,7 +658,7 @@ void copy_objects(int what)
|
|||
xctx->rotatelocal=0;
|
||||
dbg(1, "copy_objects(): START copy\n");
|
||||
rebuild_selected_array();
|
||||
if(tclgetintvar("connect_by_kissing") == 2) xctx->kissing = connect_by_kissing();
|
||||
if(xctx->connect_by_kissing == 2) xctx->kissing = connect_by_kissing();
|
||||
else xctx->kissing = 0;
|
||||
|
||||
save_selection(1);
|
||||
|
|
@ -675,7 +675,7 @@ void copy_objects(int what)
|
|||
|
||||
if(xctx->kissing) {
|
||||
pop_undo(0, 0);
|
||||
if(tclgetintvar("connect_by_kissing") == 2) tclsetintvar("connect_by_kissing", 0);
|
||||
if(xctx->connect_by_kissing == 2) xctx->connect_by_kissing = 0;
|
||||
}
|
||||
|
||||
if(fix_broken_tiled_fill || !_unix) {
|
||||
|
|
@ -719,9 +719,7 @@ void copy_objects(int what)
|
|||
int floaters = there_are_floaters();
|
||||
|
||||
|
||||
if(tclgetintvar("connect_by_kissing") == 2) {
|
||||
tclsetintvar("connect_by_kissing", 0);
|
||||
}
|
||||
if(xctx->connect_by_kissing == 2) xctx->connect_by_kissing = 0;
|
||||
|
||||
if(!floaters) bbox(START, 0.0 , 0.0 , 0.0 , 0.0);
|
||||
newpropcnt=0;
|
||||
|
|
@ -1106,7 +1104,7 @@ void move_objects(int what, int merge, double dx, double dy)
|
|||
xctx->deltax = xctx->deltay = 0.0;
|
||||
rebuild_selected_array();
|
||||
/* if connect_by_kissing==2 it was set in callback.c ('M' command) */
|
||||
if(tclgetintvar("connect_by_kissing")) xctx->kissing = connect_by_kissing();
|
||||
if(xctx->connect_by_kissing == 2) xctx->kissing = connect_by_kissing();
|
||||
else xctx->kissing = 0;
|
||||
xctx->movelastsel = xctx->lastsel;
|
||||
if(xctx->lastsel==1 && xctx->sel_array[0].type==ARC &&
|
||||
|
|
@ -1122,7 +1120,7 @@ void move_objects(int what, int merge, double dx, double dy)
|
|||
draw_selection(xctx->gctiled,0);
|
||||
if(xctx->kissing) {
|
||||
pop_undo(0, 0);
|
||||
if(tclgetintvar("connect_by_kissing") == 2) tclsetintvar("connect_by_kissing", 0);
|
||||
if(xctx->connect_by_kissing == 2) xctx->connect_by_kissing = 0;
|
||||
}
|
||||
if(fix_broken_tiled_fill || !_unix) {
|
||||
if(xctx->save_pixmap && xctx->window)
|
||||
|
|
@ -1161,9 +1159,7 @@ void move_objects(int what, int merge, double dx, double dy)
|
|||
int firsti, firstw;
|
||||
int floaters = there_are_floaters();
|
||||
|
||||
if(tclgetintvar("connect_by_kissing") == 2) {
|
||||
tclsetintvar("connect_by_kissing", 0);
|
||||
}
|
||||
if(xctx->connect_by_kissing == 2) xctx->connect_by_kissing = 0;
|
||||
if(!floaters) bbox(START, 0.0 , 0.0 , 0.0 , 0.0);
|
||||
/* no undo push for MERGE ad PLACE, already done before */
|
||||
if( !xctx->kissing && !(xctx->ui_state & (STARTMERGE | PLACE_SYMBOL | PLACE_TEXT)) ) {
|
||||
|
|
|
|||
|
|
@ -2454,7 +2454,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
}
|
||||
}
|
||||
if(stretch) select_attached_nets();
|
||||
if(kissing) tclsetintvar("connect_by_kissing", 2);
|
||||
if(kissing) xctx->connect_by_kissing = 2;
|
||||
if(argc > 3 + nparam) {
|
||||
move_objects(START,0,0,0);
|
||||
move_objects( END,0,atof(argv[2]), atof(argv[3]));
|
||||
|
|
|
|||
|
|
@ -139,10 +139,6 @@ const char *tcl_hook2(const char *cmd)
|
|||
return result;
|
||||
}
|
||||
|
||||
/* Missing:
|
||||
* if one instance is named R1[3:0] and another is named R1[2]
|
||||
* the name collision is not detected nor corrected
|
||||
*/
|
||||
void check_unique_names(int rename)
|
||||
{
|
||||
int i, first = 1, modified = 0;
|
||||
|
|
|
|||
|
|
@ -531,6 +531,8 @@ static void alloc_xschem_data(const char *top_path, const char *win_path)
|
|||
xctx->move_rot = 0;
|
||||
xctx->move_flip = 0;
|
||||
xctx->manhattan_lines = 0;
|
||||
xctx->kissing = 0;
|
||||
xctx->connect_by_kissing = 0;
|
||||
xctx->x1 = xctx->y_1 = xctx->x2 = xctx->y_2 = xctx->deltax = xctx->deltay = 0.0;
|
||||
xctx->movelastsel = 0;
|
||||
xctx->rotatelocal=0;
|
||||
|
|
|
|||
|
|
@ -946,6 +946,8 @@ typedef struct {
|
|||
/* move.c */
|
||||
double rx1, rx2, ry1, ry2;
|
||||
short move_rot;
|
||||
/* connect by kissing enable flag */
|
||||
int connect_by_kissing;
|
||||
/* a wire was created while separating a component frm a net or another component */
|
||||
int kissing;
|
||||
short move_flip;
|
||||
|
|
|
|||
|
|
@ -5588,7 +5588,7 @@ set tctx::global_list {
|
|||
INITIALINSTDIR INITIALLOADDIR INITIALPROPDIR INITIALTEXTDIR XSCHEM_LIBRARY_PATH
|
||||
add_all_windows_drives auto_hilight autofocus_mainwindow
|
||||
autotrim_wires bespice_listen_port big_grid_points bus_replacement_char cadgrid cadlayers
|
||||
cadsnap cairo_font_name change_lw color_ps colors compare_sch connect_by_kissing constrained_move
|
||||
cadsnap cairo_font_name change_lw color_ps colors compare_sch constrained_move
|
||||
copy_cell custom_label_prefix custom_token dark_colors dark_colorscheme
|
||||
delay_flag dim_bg dim_value
|
||||
disable_unique_names do_all_inst draw_crosshair draw_grid draw_window edit_prop_pos edit_prop_size
|
||||
|
|
@ -6775,7 +6775,6 @@ set_ne show_hidden_texts 0
|
|||
set_ne incr_hilight 1
|
||||
set_ne enable_stretch 0
|
||||
set_ne constrained_move 0
|
||||
set_ne connect_by_kissing 0
|
||||
set_ne unselect_partial_sel_wires 0
|
||||
set_ne draw_crosshair 0
|
||||
set_ne draw_grid 1
|
||||
|
|
|
|||
|
|
@ -177,10 +177,6 @@
|
|||
#### default: 0
|
||||
# set persistent_command 1
|
||||
|
||||
#### if set to 1 a wire is inserted when separating components that are
|
||||
#### connected by pins. Default: not enabled (0)
|
||||
# set connect_by_kissing 1
|
||||
|
||||
#### if set to 1 at end of a move operation that stretches wires attached to
|
||||
#### moved objects these wires will be unselected.
|
||||
#### default: not enabled (0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue