Button 1 Double click does edit object attributes

This commit is contained in:
Stefan Frederik 2022-07-31 09:06:10 +02:00
parent 31646cf357
commit 9e888b8b44
4 changed files with 21 additions and 16 deletions

View File

@ -85,7 +85,7 @@ Ctrl + RightButton Select object under the mouse and if label/pin
select attached nets up to net junctions
LeftButton Double click Terminate Polygon placement
Edit object attributes
XSCHEM KEY BINDINGS
----------------------------------------------------------------------

View File

@ -2584,18 +2584,23 @@ int callback(const char *winpath, int event, int mx, int my, KeySym key,
if( waves_selected(event, state, button)) {
waves_callback(event, mx, my, key, button, aux, state);
break;
}
if(xctx->semaphore >= 2) break;
dbg(1, "callback(): DoubleClick ui_state=%d state=%d\n",xctx->ui_state,state);
if(button==Button1) {
if(xctx->ui_state == STARTWIRE) {
xctx->ui_state &= ~STARTWIRE;
}
if(xctx->ui_state == STARTLINE) {
xctx->ui_state &= ~STARTLINE;
}
if( (xctx->ui_state & STARTPOLYGON) && (state ==0 ) ) {
new_polygon(SET);
} else {
if(xctx->semaphore >= 2) break;
dbg(1, "callback(): DoubleClick ui_state=%d state=%d\n",xctx->ui_state,state);
if(button==Button1) {
if(xctx->ui_state == 0 || xctx->ui_state == SELECTION) {
edit_property(0);
} else {
if(xctx->ui_state & STARTWIRE) {
xctx->ui_state &= ~STARTWIRE;
}
if(xctx->ui_state & STARTLINE) {
xctx->ui_state &= ~STARTLINE;
}
if( (xctx->ui_state & STARTPOLYGON) && (state ==0 ) ) {
new_polygon(SET);
}
}
}
}
#ifndef __unix__

View File

@ -268,9 +268,8 @@ static void find_closest_element(double mx,double my)
dbg(2, "find_closest_element(): finding closest element, instances=%d, dist=%.16g\n",i,tmp);
}
} /* end for i */
if( r!=-1 )
{
sel.n = r; sel.type = ELEMENT;
if( r!=-1 && strcmp(get_tok_value(xctx->inst[r].prop_ptr, "lock", 0), "true") ) {
sel.n = r; sel.type = ELEMENT;
}
}

View File

@ -44,6 +44,7 @@ Ctrl + RightButton Select object under the mouse and if label/pin
select attached nets up to net junctions
LeftButton Double click Terminate Polygon placement
Edit object attributes
XSCHEM KEY BINDINGS