Skip to content

Commit

Permalink
BF: Check for valid Slider units on compile script.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvbridges authored and peircej committed Oct 7, 2019
1 parent 973bd1d commit 23d80b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions psychopy/experiment/components/slider/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ def __init__(self, exp, parentName,
def writeInitCode(self, buff):

inits = getInitVals(self.params)
# check units
if inits['units'].val == 'from exp settings':
inits['units'].val = None

# build up an initialization string for Slider():
initStr = ("{name} = visual.Slider(win=win, name='{name}',\n"
" size={size}, pos={pos}, units={units},\n"
Expand Down

0 comments on commit 23d80b4

Please sign in to comment.