Skip to content

Commit

Permalink
more bad characters
Browse files Browse the repository at this point in the history
  • Loading branch information
drfeinberg committed Apr 22, 2022
1 parent 659a608 commit e3fa7b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Voicelab/VoicelabWizard/SettingsTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self, data_controller, signals, tabs, *args, **kwargs):
**kwargs:
"""
super().__init__(data_controller, signals, tabs, *args, **kwargs)

self.signals["on_files_changed"].connect(self.on_files_changed)

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

self.data_controller = data_controller

Expand Down Expand Up @@ -433,7 +435,7 @@ def on_textchanged(self, new_text):
"""

setting_type = type(self.default)
if new_text != "" and new_text != '-' and new_text != '.':
if new_text not in self.bad_inputs:
self.data_controller.set_settings(
self.fn_name, [self.name], [setting_type(new_text)]
)
Expand Down

0 comments on commit e3fa7b2

Please sign in to comment.