fix setting snap and grid values in statusbar

This commit is contained in:
Stefan Frederik 2021-11-17 01:30:37 +01:00
parent bd626427fd
commit 937261807b
3 changed files with 4 additions and 4 deletions

View File

@ -112,7 +112,7 @@ void print_version()
void set_snap(double newsnap) /* 20161212 set new snap factor and just notify new value */
{
static double default_snap = -1.0;
int cs;
double cs;
cs = tclgetdoublevar("cadsnap");
if(default_snap == -1.0) {

View File

@ -145,7 +145,7 @@ int callback(const char *winpath, int event, int mx, int my, KeySym key,
struct stat buf;
int redraw_only;
unsigned short sel;
int c_snap;
double c_snap;
#ifndef __unix__
short cstate = GetKeyState(VK_CAPITAL);
short nstate = GetKeyState(VK_NUMLOCK);

View File

@ -3710,8 +3710,8 @@ proc pack_widgets { { topwin {} } } {
pack $topwin.menubar -anchor n -side top -fill x -before $topwin.drw
toolbar_show $topwin
pack $topwin.statusbar -after $topwin.drw -anchor sw -fill x
bind $topwin.statusbar.5 <Leave> {xschem set cadgrid $cadgrid}
bind $topwin.statusbar.3 <Leave> {xschem set cadsnap $cadsnap}
bind $topwin.statusbar.5 <Leave> "set cadgrid \[$topwin.statusbar.5 get\]; xschem set cadgrid \$cadgrid"
bind $topwin.statusbar.3 <Leave> "set cadsnap \[$topwin.statusbar.3 get\]; xschem set cadsnap \$cadsnap"
set_bindings $topwin.drw
}
}