Merge pull request #955 from MikeTheWatchGuy/Dev-latest

Dev latest
This commit is contained in:
MikeTheWatchGuy 2018-12-19 10:12:06 -05:00 committed by GitHub
commit a3220262b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -20,8 +20,6 @@ while True: # Event Loop
event, values = window.Read()
if event in (None, 'Exit'):
break
if not len(values['_INPUT_']): # if field is empty ignore
continue
if values['_INPUT_'][-1] not in ('0123456789'): # if last char entered not a digit
window.Element('_INPUT_').Update(values['_INPUT_'][:-1]) # delete last char from input
if len(values['_INPUT_']) and values['_INPUT_'][-1] not in ('0123456789'): # if last char entered not a digit
window.Element('_INPUT_').Update(values['_INPUT_'][:-1]) # delete last char from input
window.Close()