From 9daeba94d2fae8fe2663a953aa1f5242bb5d2f62 Mon Sep 17 00:00:00 2001 From: David Bridges Date: Fri, 13 Sep 2019 12:10:16 +0100 Subject: [PATCH] BF: Disable the Form aperture on creation, enable only on draw This fix stops the aperture from being drawn when the Form is created. This was causing the aperture to persist over all routines, until the Form was actually drawn, where the aperture could be disabled. --- psychopy/visual/form.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/psychopy/visual/form.py b/psychopy/visual/form.py index 77965702a3..a33968b815 100644 --- a/psychopy/visual/form.py +++ b/psychopy/visual/form.py @@ -596,13 +596,15 @@ def _setAperture(self): psychopy.visual.Aperture The aperture setting viewable area for forms """ - return psychopy.visual.Aperture(win=self.win, - name='aperture', - units=self.units, - shape='square', - size=self.size, - pos=(0, 0), - autoLog=False) + aperture = psychopy.visual.Aperture(win=self.win, + name='aperture', + units=self.units, + shape='square', + size=self.size, + pos=(0, 0), + autoLog=False) + aperture.disable() # Disable on creation. Only enable on draw. + return aperture def _getScrollOffset(self): """Calculate offset position of items in relation to markerPos