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

Fixed FSLEyesFrame allowing panels to be removed from centre pane (I

think). Also fixed that persistent VolumeOpts.__toggleListeners error -
DisplayOpts.destroy was not calling syncable.detachFromParent,  so
dangling references in DisplayOpts peers lists were being left.
parent d345ed9b
No related branches found
No related tags found
No related merge requests found
...@@ -436,6 +436,8 @@ class DisplayOpts(actions.ActionProvider): ...@@ -436,6 +436,8 @@ class DisplayOpts(actions.ActionProvider):
""" """
actions.ActionProvider.destroy(self) actions.ActionProvider.destroy(self)
self.detachFromParent()
self.overlay = None self.overlay = None
self.display = None self.display = None
self.overlayList = None self.overlayList = None
......
...@@ -246,6 +246,8 @@ class DisplayContext(props.SyncableHasProperties): ...@@ -246,6 +246,8 @@ class DisplayContext(props.SyncableHasProperties):
instances managed by it are destroyed as well. instances managed by it are destroyed as well.
""" """
self.detachFromParent()
self.__overlayList.removeListener('overlays', self.__name) self.__overlayList.removeListener('overlays', self.__name)
for overlay, display in self.__displays.items(): for overlay, display in self.__displays.items():
......
...@@ -186,8 +186,8 @@ class FSLEyesFrame(wx.Frame): ...@@ -186,8 +186,8 @@ class FSLEyesFrame(wx.Frame):
paneInfo = (aui.AuiPaneInfo() paneInfo = (aui.AuiPaneInfo()
.Name(title) .Name(title)
.Caption(title) .Caption(title)
.Dockable()
.CloseButton() .CloseButton()
.Dockable()
.Resizable() .Resizable()
.DestroyOnClose()) .DestroyOnClose())
...@@ -199,7 +199,7 @@ class FSLEyesFrame(wx.Frame): ...@@ -199,7 +199,7 @@ class FSLEyesFrame(wx.Frame):
# So if we only have one panel, we # So if we only have one panel, we
# hide the caption bar # hide the caption bar
if panelId == 1: if panelId == 1:
paneInfo.Centre().CaptionVisible(False) paneInfo.Centre().Dockable(False).CaptionVisible(False)
# But then re-show it when another # But then re-show it when another
# panel is added. The __viewPanels # panel is added. The __viewPanels
...@@ -330,9 +330,9 @@ class FSLEyesFrame(wx.Frame): ...@@ -330,9 +330,9 @@ class FSLEyesFrame(wx.Frame):
numPanels = len(self.__viewPanels) numPanels = len(self.__viewPanels)
wasCentre = paneInfo.dock_direction_get() == aui.AUI_DOCK_CENTRE wasCentre = paneInfo.dock_direction_get() == aui.AUI_DOCK_CENTRE
if numPanels == 1 or (numPanels > 0 and wasCentre): if numPanels >= 1 and wasCentre:
paneInfo = self.__viewPanels.keys()[0] paneInfo = self.__viewPanels.keys()[0]
paneInfo.Centre().CaptionVisible(False) paneInfo.Centre().Dockable(False).CaptionVisible(numPanels > 1)
def __onClose(self, ev): def __onClose(self, ev):
......
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