Skip to content

Commit e3fa7b2

Browse files
committed
more bad characters
1 parent 659a608 commit e3fa7b2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Voicelab/VoicelabWizard/SettingsTab.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def __init__(self, data_controller, signals, tabs, *args, **kwargs):
2525
**kwargs:
2626
"""
2727
super().__init__(data_controller, signals, tabs, *args, **kwargs)
28+
2829
self.signals["on_files_changed"].connect(self.on_files_changed)
2930

3031
# stores the current, cached, and default values for what line edits should be checked
@@ -371,6 +372,7 @@ def __init__(
371372
**kwargs:
372373
"""
373374
super().__init__(*args, **kwargs)
375+
self.bad_inputs = {" ", ",", ".", ":", ";", "!", "?", "'", "\\", "/", "", "-", '_', '+', '=', '*', '&', '^', '%', '$', '#', '@', '~', '`', '<', '>', '|', '{', '}', '[', ']', '(', ')', '"', '\''}
374376

375377
self.data_controller = data_controller
376378

@@ -433,7 +435,7 @@ def on_textchanged(self, new_text):
433435
"""
434436

435437
setting_type = type(self.default)
436-
if new_text != "" and new_text != '-' and new_text != '.':
438+
if new_text not in self.bad_inputs:
437439
self.data_controller.set_settings(
438440
self.fn_name, [self.name], [setting_type(new_text)]
439441
)

0 commit comments

Comments
 (0)