if crosshair is displayed and xschem blocked by a tk_messageBox restore pointer to default, so it will be visible. Do not parse labels if not vectored labels (shortcut)

This commit is contained in:
stefan schippers 2023-09-30 00:13:33 +02:00
parent 00ef95c90e
commit c25a9f9d85
2 changed files with 16 additions and 2 deletions

View File

@ -97,7 +97,12 @@ const char *expandlabel(const char *s, int *m)
YY_BUFFER_STATE buf;
my_free(_ALLOC_ID_, &dest_string.str); /* 30102004 delete 'memory' of previous execution */
if(parselabel_debug >= 3) fprintf(errfp, "expandlabel(): entering\n");
if(!strpbrk(s, "*,.:")) { /* shortcut: nothing to parse / expand */
*m = 1;
return s;
}
buf=yy_scan_string(s);
yyparse();
yy_delete_buffer(buf);

View File

@ -5762,7 +5762,11 @@ global env has_x OS autofocus_mainwindow
}
}
"
bind $topwin <Leave> "xschem callback %W %T %x %y 0 0 0 %s; graph_show_measure stop"
bind $topwin <Leave> "
xschem callback %W %T %x %y 0 0 0 %s
graph_show_measure stop
$topwin configure -cursor {}
"
bind $topwin <Expose> "xschem callback %W %T %x %y 0 %w %h %s"
bind $topwin <Double-Button-1> "xschem callback %W -3 %x %y 0 %b 0 %s"
bind $topwin <Double-Button-2> "xschem callback %W -3 %x %y 0 %b 0 %s"
@ -5774,7 +5778,12 @@ global env has_x OS autofocus_mainwindow
bind $topwin <KeyRelease> "xschem callback %W %T %x %y %N 0 0 %s"
if {$autofocus_mainwindow} {
bind $topwin <Motion> "focus $topwin; xschem callback %W %T %x %y 0 0 0 %s"
bind $topwin <Enter> "destroy .ctxmenu; focus $topwin; xschem callback %W %T %x %y 0 0 0 0"
bind $topwin <Enter> "
if {\$draw_crosshair} {$topwin configure -cursor none}
destroy .ctxmenu
focus $topwin
xschem callback %W %T %x %y 0 0 0 0
"
} else {
bind $topwin <Motion> "xschem callback %W %T %x %y 0 0 0 %s"
bind $topwin <Enter> "destroy .ctxmenu; xschem callback %W %T %x %y 0 0 0 0"