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

When one view panel is remaining, it retains its display context

values (the master dctx inherits from the one remaining child).
parent 2795af8c
No related branches found
No related tags found
No related merge requests found
......@@ -459,16 +459,31 @@ class FSLEyesFrame(wx.Frame):
# master display context.
if numPanels == 1 and \
isinstance(self.__viewPanels[0], views.CanvasPanel):
dctx = self.__viewPanels[0].getDisplayContext()
dctx = self.__viewPanels[0].getDisplayContext()
displays = [dctx.getDisplay(o) for o in self.__overlayList]
# Make sure that the parent context
# inherits the values from this context
dctx.setBindingDirection(False)
# TODO Currently this causes the child
# context to inherit the values of the
# parent context. But we need the
# opposite - for the parent to inherit
# the values of the child.
for display in displays:
opts = display.getDisplayOpts()
display.setBindingDirection(False)
opts .setBindingDirection(False)
dctx.syncOverlayDisplay = True
dctx.syncToParent('overlayOrder')
# Reset the binding directiona
dctx.setBindingDirection(True)
for display in displays:
opts = display.getDisplayOpts()
display.setBindingDirection(True)
opts .setBindingDirection(True)
def __onClose(self, ev):
"""Called when the user closes this ``FSLEyesFrame``.
......
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