further fix previous regression
This commit is contained in:
parent
54e446dbc2
commit
55ac6bb396
|
|
@ -1234,6 +1234,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
|||
xctx->mouse_inside = 0;
|
||||
break;
|
||||
case EnterNotify:
|
||||
dbg(2, "callback(): Enter event sel_or_clip=%s, ui_state=%d\n", sel_or_clip, xctx->ui_state);
|
||||
xctx->mouse_inside = 1;
|
||||
if(draw_xhair)
|
||||
tclvareval(xctx->top_path, ".drw configure -cursor none" , NULL);
|
||||
|
|
@ -1242,7 +1243,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
|||
/* xschem window *sending* selected objects
|
||||
when the pointer comes back in abort copy operation since it has been done
|
||||
in another xschem xctx->window; STARTCOPY set and selection file does not exist any more */
|
||||
if( stat(sel_or_clip, &buf) && (xctx->ui_state & STARTCOPY) )
|
||||
if(stat(sel_or_clip, &buf) && (xctx->ui_state & STARTCOPY) )
|
||||
{
|
||||
copy_objects(ABORT); /* also unlinks sel_or_flip file */
|
||||
unselect_all(1);
|
||||
|
|
@ -1253,8 +1254,7 @@ int rstate; /* (reduced state, without ShiftMask) */
|
|||
}
|
||||
/*xschem window *receiving* selected objects
|
||||
* no selected objects and selection file exists --> start merge */
|
||||
if(xctx->lastsel == 0 && !stat(sel_or_clip, &buf)) {
|
||||
dbg(2, "callback(): Enter event\n");
|
||||
if(xctx->lastsel == 0 && !stat(sel_or_clip, &buf)) {
|
||||
xctx->mousex_snap = 490;
|
||||
xctx->mousey_snap = -340;
|
||||
merge_file(1, ".sch");
|
||||
|
|
|
|||
|
|
@ -939,6 +939,7 @@ void move_objects(int what, int merge, double dx, double dy)
|
|||
{
|
||||
int firsti, firstw;
|
||||
|
||||
xunlink(sel_or_clip);
|
||||
|
||||
if(xctx->connect_by_kissing == 2) xctx->connect_by_kissing = 0;
|
||||
/* no undo push for MERGE ad PLACE and polygon point drag, already done before */
|
||||
|
|
|
|||
|
|
@ -330,8 +330,6 @@ void merge_file(int selection_load, const char ext[])
|
|||
my_snprintf(name, S(name), "%s/.clipboard.sch", user_conf_dir);
|
||||
}
|
||||
|
||||
my_snprintf(sel_or_clip, S(sel_or_clip), name);
|
||||
|
||||
if(is_generator(name)) generator = 1;
|
||||
|
||||
if(generator) {
|
||||
|
|
|
|||
|
|
@ -4888,8 +4888,6 @@ void save_selection(int what)
|
|||
else /* what=2 */
|
||||
my_snprintf(name, S(name), "%s/%s.sch",user_conf_dir , ".clipboard");
|
||||
|
||||
my_snprintf(sel_or_clip, S(sel_or_clip), name);
|
||||
|
||||
if(!(fd=fopen(name,"w")))
|
||||
{
|
||||
fprintf(errfp, "save_selection(): problems opening file %s \n", name);
|
||||
|
|
|
|||
|
|
@ -6227,6 +6227,10 @@ proc context_menu { } {
|
|||
wm geometry .ctxmenu "+$x+$y";# move away from screen edges
|
||||
bind .ctxmenu <Leave> {if { {%W} eq {.ctxmenu} } {destroy .ctxmenu}}
|
||||
tkwait window .ctxmenu
|
||||
# when context menu is destroyed an EnterNotify event is generated in the
|
||||
# main xschem window. We want to process this event before taking
|
||||
# actions based on $retval.
|
||||
update
|
||||
return $retval
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue