Skip to content

Commit

Permalink
Frequency range checking is now performed directly in functions
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Muenker <mail@chipmuenk.de>
  • Loading branch information
chipmuenk committed May 15, 2024
1 parent 3cf7ad8 commit 9529ebc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pyfda/plot_widgets/tran/plot_tran_stim_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,8 @@ def _store_entry(source):
scale = getattr(self, param_name) # get scale value
var_old = getattr(self, var_name) # get old var value
# assign var with either content of text field or fallback value:
if var_name in {'T1', 'T2'}:
var = safe_eval(source.text(), var_old * scale,
return_type='float') / scale
else:
var = safe_eval(source.text(), var_old * scale,
sign='pos', return_type='float') / scale
var = safe_eval(
source.text(), var_old * scale, return_type='float') / scale
# assign evaluated text field to variable
setattr(self, var_name, var)
# set textfield with scaled value of `var_name`:
Expand Down

0 comments on commit 9529ebc

Please sign in to comment.