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

More fixes to bring in line with props.addListener behaviour change

parent 802e8199
No related branches found
No related tags found
No related merge requests found
......@@ -160,12 +160,14 @@ class ImageListPanel(controlpanel.ControlPanel):
image.addListener(
'name',
self._name,
lambda c, va, vi, img=image: nameChanged(img))
lambda c, va, vi, img=image: nameChanged(img),
overwrite=True)
display.addListener(
'enabled',
self._name,
lambda c, va, vi, img=image: enabledChanged(img))
lambda c, va, vi, img=image: enabledChanged(img),
overwrite=True)
if len(self._imageList) > 0:
self._listBox.SetSelection(selection)
......
......@@ -129,7 +129,8 @@ class ImageSelectPanel(controlpanel.ControlPanel):
for image in self._imageList:
image.addListener('name',
self._name,
lambda c, va, vi, i=image: nameChanged(i))
lambda c, va, vi, i=image: nameChanged(i),
overwrite=True)
self._selectedImageChanged()
......
......@@ -330,6 +330,8 @@ class SliceCanvas(props.HasProperties):
display = image.getAttribute('display')
# Called when the GL object representation
# of the image needs to be re-created
def genGLObject(ctx=None, value=None, valid=None, disp=display):
globj = globject.createGLObject(image, disp)
image.setAttribute(self.name, globj)
......
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