Commit 7e4c98a1 authored by Thomas Vincent's avatar Thomas Vincent

fix disble roi

parent 8a69452f
......@@ -609,19 +609,18 @@ class QSpaceView(Qt.QMainWindow):
region = self.__view3d.getSelectedRegion()
if on and region:
([xLeft, xRight],
[yLeft, yRight],
[zLeft, zRight]) = region.getDataRange()
xRange, yRange, zRange = region.getDataRange()
([zLeft, zRight],
[yLeft, yRight],
[xLeft, xRight]) = ([None, None], [None, None], [None, None])
xRange, yRange, zRange = None, None, None
# TODO would be better to do that in fit widget
roiWidget = self.__fitWidget.roiWidget()
roiWidget.xSlider().setValues(xLeft, xRight)
roiWidget.ySlider().setValues(yLeft, yRight)
roiWidget.zSlider().setValues(zLeft, zRight)
for slider, range_ in ((roiWidget.xSlider(), xRange),
(roiWidget.ySlider(), yRange),
(roiWidget.zSlider(), zRange)):
if range_ is None:
range_ = slider.getRange()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment