Skip to content

Commit 23d80b4

Browse files
dvbridgespeircej
authored andcommitted
BF: Check for valid Slider units on compile script.
1 parent 973bd1d commit 23d80b4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

psychopy/experiment/components/slider/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ def __init__(self, exp, parentName,
197197
def writeInitCode(self, buff):
198198

199199
inits = getInitVals(self.params)
200+
# check units
201+
if inits['units'].val == 'from exp settings':
202+
inits['units'].val = None
203+
200204
# build up an initialization string for Slider():
201205
initStr = ("{name} = visual.Slider(win=win, name='{name}',\n"
202206
" size={size}, pos={pos}, units={units},\n"

0 commit comments

Comments
 (0)