add command `xschem swap_cursors`
This commit is contained in:
parent
8067f58b43
commit
7cd7d16f6a
|
|
@ -2246,7 +2246,6 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
* {C1} {capa.sym} 150 150 1 1 */
|
* {C1} {capa.sym} 150 150 1 1 */
|
||||||
else if(!strcmp(argv[1], "instance_coord"))
|
else if(!strcmp(argv[1], "instance_coord"))
|
||||||
{
|
{
|
||||||
/* xschem instances_to_net PLUS */
|
|
||||||
xSymbol *symbol;
|
xSymbol *symbol;
|
||||||
short flip, rot;
|
short flip, rot;
|
||||||
double x0,y0;
|
double x0,y0;
|
||||||
|
|
@ -2502,7 +2501,6 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
* { {Vpanel1} {minus} {600} {-440} } */
|
* { {Vpanel1} {minus} {600} {-440} } */
|
||||||
else if(!strcmp(argv[1], "instances_to_net"))
|
else if(!strcmp(argv[1], "instances_to_net"))
|
||||||
{
|
{
|
||||||
/* xschem instances_to_net PLUS */
|
|
||||||
xSymbol *symbol;
|
xSymbol *symbol;
|
||||||
xRect *rct;
|
xRect *rct;
|
||||||
double pinx0, piny0;
|
double pinx0, piny0;
|
||||||
|
|
@ -5302,6 +5300,31 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
Tcl_ResetResult(interp);
|
Tcl_ResetResult(interp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* swap_cursors
|
||||||
|
* swap cursor A (1) and cursor B (2) positions.
|
||||||
|
*/
|
||||||
|
else if(!strcmp(argv[1], "swap_cursors"))
|
||||||
|
{
|
||||||
|
xRect *r;
|
||||||
|
Graph_ctx *gr;
|
||||||
|
double tmp;
|
||||||
|
int floaters = there_are_floaters();
|
||||||
|
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
|
||||||
|
if(xctx->rects[GRIDLAYER] > 0) {
|
||||||
|
r = &xctx->rect[GRIDLAYER][0];
|
||||||
|
gr = &xctx->graph_struct;
|
||||||
|
setup_graph_data(0, 0, gr);
|
||||||
|
tmp = xctx->graph_cursor2_x;
|
||||||
|
xctx->graph_cursor2_x = xctx->graph_cursor1_x;
|
||||||
|
xctx->graph_cursor1_x = tmp;
|
||||||
|
if(tclgetboolvar("live_cursor2_backannotate")) {
|
||||||
|
backannotate_at_cursor_b_pos(r, gr);
|
||||||
|
if(floaters) set_modify(-2); /* update floater caches to reflect actual backannotation */
|
||||||
|
}
|
||||||
|
draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* swap_windows
|
/* swap_windows
|
||||||
* swap first and second window in window interface (internal command)
|
* swap first and second window in window interface (internal command)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue