Skip to content

Commit

Permalink
Support decimal inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mitaa committed Oct 7, 2024
1 parent 3f062e5 commit 5ddd5e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/production_planner/datatable.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,10 @@ def on_key(self, event: events.Key) -> None:
self.num_write_mode = col.edit_backspace()
case _ if len(event.key) == 1 and 58 > ord(event.key) > 47:
self.num_write_mode = col.edit_push_numeral(event.key, self.num_write_mode)
case "-" | "+":
self.num_write_mode = col.edit_sign()
case ".":
self.num_write_mode = col.edit_push_dot()
# case "-" | "+":
# self.num_write_mode = col.edit_sign()
case "full_stop":
self.num_write_mode = col.edit_push_dot(None, None)
case _:
self.num_write_mode = False
return
Expand Down
2 changes: 1 addition & 1 deletion tests
Submodule tests updated 79 files
+88 −88 __snapshots__/test_base_screens/test_purity_screen.svg
+82 −82 __snapshots__/test_base_screens/test_startup_screen.svg
+77 −77 __snapshots__/test_init_data_folder/test_init_data[keys1].svg
+81 −81 __snapshots__/test_init_data_folder/test_init_data[keys2].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys0].svg
+190 −0 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys10].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys1].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys2].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys3].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys4].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys5].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys6].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys7].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys8].svg
+190 −0 __snapshots__/test_num_inputs/test_num_inputs_CLAMP[keys9].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys0].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys1].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys2].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys3].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys4].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys5].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys6].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys7].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys8].svg
+190 −0 __snapshots__/test_num_inputs/test_num_inputs_CLOCKRATE[keys9].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys0].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys1].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys2].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys3].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys4].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys5].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys6].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys7].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys8].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_MK[keys9].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys0].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys1].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys2].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys3].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys4].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys5].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys6].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys7].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys8].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_PURITY[keys9].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys0].svg
+190 −0 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys10].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys1].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys2].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys3].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys4].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys5].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys6].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys7].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys8].svg
+83 −83 __snapshots__/test_num_inputs/test_num_inputs_QTY[keys9].svg
+83 −83 __snapshots__/test_rows/test_rows_ADD[keys0].svg
+83 −83 __snapshots__/test_rows/test_rows_ADD[keys1].svg
+83 −83 __snapshots__/test_rows/test_rows_ADD[keys2].svg
+83 −83 __snapshots__/test_rows/test_rows_ADD[keys3].svg
+77 −77 __snapshots__/test_rows/test_rows_REMOVE[keys0].svg
+77 −77 __snapshots__/test_rows/test_rows_REMOVE[keys1].svg
+83 −83 __snapshots__/test_rows/test_rows_REMOVE[keys2].svg
+83 −83 __snapshots__/test_rows/test_rows_REMOVE[keys3].svg
+77 −77 __snapshots__/test_rows/test_rows_REMOVE[keys4].svg
+83 −83 __snapshots__/test_rows/test_rows_REMOVE[keys5].svg
+82 −82 __snapshots__/test_rows/test_rows_REMOVE[keys6].svg
+7 −3 test_num_inputs.py
+84 −84 with_modules/__snapshots__/test_expand/test_module_COLLAPSE[keys0].svg
+84 −84 with_modules/__snapshots__/test_expand/test_module_COLLAPSE[keys1].svg
+85 −85 with_modules/__snapshots__/test_expand/test_module_EXPAND[keys0].svg
+85 −85 with_modules/__snapshots__/test_expand/test_module_EXPAND[keys1].svg
+84 −84 with_modules/__snapshots__/test_save_with_expanded_module/test_save_with_module[keys0].svg
+85 −85 with_modules/__snapshots__/test_show_hide/test_module_hide_show[keys0].svg
+82 −82 with_modules/__snapshots__/test_show_hide/test_module_hide_show[keys1].svg
+77 −77 with_modules/__snapshots__/test_show_hide/test_module_hide_show[keys2].svg
+84 −84 with_modules/__snapshots__/test_show_hide/test_module_hide_show[keys3].svg
+85 −85 with_modules/__snapshots__/test_show_hide/test_module_hide_show[keys4].svg
+84 −84 with_modules/__snapshots__/test_show_hide/test_module_hide_show[keys5].svg

0 comments on commit 5ddd5e0

Please sign in to comment.