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

Fixed bug whereby display properties were being reset when a new view panel

was opened
parent 93a3db51
No related branches found
No related tags found
No related merge requests found
......@@ -181,24 +181,6 @@ class ImageDisplay(props.SyncableHasProperties):
:arg parent:
"""
props.SyncableHasProperties.__init__(
self,
parent,
# The name property is implicitly bound
# through the image object so it doesn't
# need to be linked between ImageDisplays
nobind=['name'],
# These properties cannot be unbound, as
# they affect the OpenGL representation
nounbind=['interpolation',
'volume',
'resolution',
'transform',
'imageType'])
self.image = image
# bind self.name to # image.name, so changes
......@@ -267,6 +249,27 @@ class ImageDisplay(props.SyncableHasProperties):
self._oldWorldToDisplayMat = self.worldToDisplayMat
self._oldDisplayToWorldMat = self.displayToWorldMat
# Call the super constructor after our own
# initialisation, in case the provided parent
# has different property values to our own,
# and our values need to be updated
props.SyncableHasProperties.__init__(
self,
parent,
# The name property is implicitly bound
# through the image object so it doesn't
# need to be linked between ImageDisplays
nobind=['name'],
# These properties cannot be unbound, as
# they affect the OpenGL representation
nounbind=['interpolation',
'volume',
'resolution',
'transform',
'imageType'])
def _transformChanged(self, *a):
"""Called when the :attr:`transform` property is changed.
......
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