Infix? You press the bindkey ('w') and, wherever your mouse is at that instant, that's where it starts from. Yuck!
The newbie way (me):
if(key == 'w' /* && !xctx->ui_state */ && rstate==0) /* place wire. */
{
/* AC hack trying to get rid of infix */
xctx->ui_state |= MENUSTART;
xctx->ui_state2 = MENUSTARTWIRE;
break; /* AC hack */
int prev_state = xctx->ui_state;
if(xctx->semaphore >= 2) break;
start_wire(xctx->mousex_snap, xctx->mousey_snap);
if(prev_state == STARTWIRE) {
tcleval("set constr_mv 0" );
xctx->constr_mv=0;
}
break;
}
And the pro way (Chayan):
if(key == 'w' /* && !xctx->ui_state */ && rstate==0) /* place wire. */
{
int prev_state = xctx->ui_state;
if (xctx->semaphore >= 2) break;
if (tclgetboolvar("infix_wire")) {
start_wire(xctx->mousex_snap, xctx->mousey_snap);
} else if (prev_state == STARTWIRE) {
start_wire(xctx->mousex_snap, xctx->mousey_snap);
} else {
tcleval("xschem wire");
}
if (prev_state == STARTWIRE) {
tcleval("set constr_mv 0");
xctx->constr_mv = 0;
}
break;
}
No comments:
Post a Comment