seems to be working again

This commit is contained in:
sezanzeb 2020-11-08 01:02:04 +01:00 committed by sezanzeb
parent 8a496644eb
commit d93e7f271b
2 changed files with 7 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class Mapping:
"""
print('change', previous_keycode, new_keycode, character)
if new_keycode and character and new_keycode != previous_keycode:
self.add(new_keycode, character)
self._mapping[new_keycode] = character
if new_keycode != previous_keycode:
# clear previous mapping of that code, because the line
# representing that one will now represent a different one.

View File

@ -114,6 +114,11 @@ class Integration(unittest.TestCase):
gtk_iteration()
self.assertEqual(self.window.selected_preset, 'new preset')
self.assertListEqual(
sorted(os.listdir(f'{tmp}/symbols/device_1')),
['new_preset', 'new_preset_2']
)
# now try to change the name
self.window.get('preset_name_input').set_text('abc 123')
gtk_iteration()
@ -132,7 +137,7 @@ class Integration(unittest.TestCase):
)
self.assertListEqual(
sorted(os.listdir(f'{tmp}/symbols/device_1')),
['abc_123', 'new_preset', 'new_preset_2']
['abc_123', 'new_preset_2']
)