Fix sheet label escape key

This commit is contained in:
Tanner Collin 2022-10-18 23:37:23 -06:00
parent 58d1f5cd59
commit 8a4d4ca557

View File

@ -744,7 +744,7 @@ while True:
stdscr.clrtoeol() stdscr.clrtoeol()
stdscr.addstr(10, 4, 'Enter your contact info: ' + label_material_contact) stdscr.addstr(10, 4, 'Enter your contact info: ' + label_material_contact)
stdscr.clrtoeol() stdscr.clrtoeol()
stdscr.addstr(23, 1, '[RETURN] Next [ESC] Cancel') stdscr.addstr(23, 1, '[RETURN] Print [ESC] Cancel')
elif label_material_name: elif label_material_name:
stdscr.addstr(8, 4, '') stdscr.addstr(8, 4, '')
stdscr.clrtoeol() stdscr.clrtoeol()
@ -1062,6 +1062,7 @@ while True:
if c == curses.KEY_BACKSPACE: if c == curses.KEY_BACKSPACE:
label_material_contact = label_material_contact[:-2] + '_' label_material_contact = label_material_contact[:-2] + '_'
elif c == KEY_ESCAPE: elif c == KEY_ESCAPE:
label_material_name = ''
label_material_contact = '' label_material_contact = ''
stdscr.erase() stdscr.erase()
elif c == KEY_ENTER: elif c == KEY_ENTER:
@ -1080,6 +1081,7 @@ while True:
label_material_name = label_material_name[:-2] + '_' label_material_name = label_material_name[:-2] + '_'
elif c == KEY_ESCAPE: elif c == KEY_ESCAPE:
label_material_name = '' label_material_name = ''
label_material_contact = ''
stdscr.erase() stdscr.erase()
elif c == KEY_ENTER: elif c == KEY_ENTER:
if len(label_material_name) > 1: if len(label_material_name) > 1: