Skip to content
Snippets Groups Projects
Commit ac288622 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Nasty bugfix in slicecanvas imageType property callback - nested method

using wrong variable names. Don't know how this has not caused problems
previously.
parent d952581b
No related branches found
No related tags found
No related merge requests found
......@@ -380,28 +380,29 @@ class SliceCanvas(props.HasProperties):
# Called when the GL object representation
# of the image needs to be re-created
def genGLObject(ctx=None,
value=None,
def genGLObject(value=None,
valid=None,
ctx=None,
name=None,
disp=display):
disp=display,
img=image):
log.debug('GLObject representation for {} '
'changed to {}'.format(display.name,
display.imageType))
'changed to {}'.format(disp.name,
disp.imageType))
# Tell the previous GLObject (if
# any) to clean up after itself
try:
globj = image.getAttribute(self.name)
globj = img.getAttribute(self.name)
globj.destroy()
except KeyError:
pass
globj = globject.createGLObject(image, disp)
opts = display.getDisplayOpts()
globj = globject.createGLObject(img, disp)
opts = disp.getDisplayOpts()
image.setAttribute(self.name, globj)
img.setAttribute(self.name, globj)
if globj is not None:
globj.init()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment