@@ -398,7 +398,7 @@ def handler():
398398 to move."""
399399 stage_direction = - 1 if self .flip_flags [axis ] else 1
400400 try :
401- temp = position_val .get () + step_val .get () * stage_direction
401+ temp = float ( position_val .get () ) + step_val .get () * stage_direction
402402 except tk ._tkinter .TclError :
403403 return
404404 if self .stage_limits is True :
@@ -407,7 +407,7 @@ def handler():
407407 elif temp < self .position_min [axis ]:
408408 temp = self .position_min [axis ]
409409 # guarantee stage won't move out of limits
410- if position_val .get () != temp :
410+ if float ( position_val .get () ) != temp :
411411 position_val .set (temp )
412412 self .position_callback (axis )()
413413
@@ -439,7 +439,7 @@ def handler():
439439 to move."""
440440 stage_direction = - 1 if self .flip_flags [axis ] else 1
441441 try :
442- temp = position_val .get () - step_val .get () * stage_direction
442+ temp = float ( position_val .get () ) - step_val .get () * stage_direction
443443 except tk ._tkinter .TclError :
444444 return
445445 if self .stage_limits is True :
@@ -448,7 +448,7 @@ def handler():
448448 elif temp > self .position_max [axis ]:
449449 temp = self .position_max [axis ]
450450 # guarantee stage won't move out of limits
451- if position_val .get () != temp :
451+ if float ( position_val .get () ) != temp :
452452 position_val .set (temp )
453453 self .position_callback (axis )()
454454
@@ -558,7 +558,7 @@ def handler(*args):
558558 self .view .after_cancel (self .event_id [axis ])
559559 # if position is not a number, then do not move stage
560560 try :
561- position = position_var .get ()
561+ position = float ( position_var .get () )
562562 if self .stage_limits :
563563 widget .trigger_focusout_validation ()
564564 # if position is not inside limits do not move stage
0 commit comments