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

LocationPanel imports fslview.strings within methods, to avoid circular

import issues
parent 0b6842f7
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,7 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties): ...@@ -46,6 +46,7 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties):
Creates and lays out the LocationPanel, and sets up a few property Creates and lays out the LocationPanel, and sets up a few property
event listeners. event listeners.
""" """
import fsl.fslview.strings as strings
controlpanel.ControlPanel.__init__(self, parent, imageList, displayCtx) controlpanel.ControlPanel.__init__(self, parent, imageList, displayCtx)
...@@ -193,6 +194,7 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties): ...@@ -193,6 +194,7 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties):
:attr:`fsl.fslview.displaycontext.DisplayContext.volume` :attr:`fsl.fslview.displaycontext.DisplayContext.volume`
property changes. Updates the voxel value label. property changes. Updates the voxel value label.
""" """
import fsl.fslview.strings as strings
volume = self._displayCtx.volume volume = self._displayCtx.volume
...@@ -245,6 +247,7 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties): ...@@ -245,6 +247,7 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties):
Propagates the change on to the voxel location in the currently Propagates the change on to the voxel location in the currently
selected image. selected image.
""" """
import fsl.fslview.strings as strings
if len(self._imageList) == 0: return if len(self._imageList) == 0: return
...@@ -316,6 +319,8 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties): ...@@ -316,6 +319,8 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties):
image changes. Updates the 'space' label to reflect the change. image changes. Updates the 'space' label to reflect the change.
""" """
import fsl.fslview.strings as strings
if len(self._imageList) == 0: if len(self._imageList) == 0:
self._spaceLabel.SetLabel('') self._spaceLabel.SetLabel('')
self._locationPanel.Layout() self._locationPanel.Layout()
...@@ -333,8 +338,3 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties): ...@@ -333,8 +338,3 @@ class LocationPanel(controlpanel.ControlPanel, props.HasProperties):
self._spaceLabel.SetLabel(spaceLabel) self._spaceLabel.SetLabel(spaceLabel)
self._locationPanel.Layout() self._locationPanel.Layout()
# strings imports locationpanel, so this is
# at the bottom to avoid a circular import
import fsl.fslview.strings as strings
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