diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index ad67721..a65853c 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -222,7 +222,7 @@ class WWWLInteractorStyle(ZoomInteractorStyle): self.last_x, self.last_y = iren.GetLastEventPosition() -class LinearMeasure(ZoomInteractorStyle): +class LinearMeasureInteractorStyle(ZoomInteractorStyle): """ Interactor style responsible for insert linear measurements. """ @@ -251,22 +251,7 @@ class LinearMeasure(ZoomInteractorStyle): Publisher.sendMessage('Update slice viewer') -class PanMoveInteractorStyle(ZoomInteractorStyle): - """ - Interactor style responsible for translate the camera. - """ - def __init__(self): - ZoomInteractorStyle.__init__(self) - self.AddObserver("MouseMoveEvent", self.OnPanMove) - - def OnPanMove(self, obj, evt): - print "PAN" - if self.left_pressed: - obj.Pan() - obj.OnRightButtonDown() - - -class AngularMeasure(ZoomInteractorStyle): +class AngularMeasureInteractorStyle(ZoomInteractorStyle): """ Interactor style responsible for insert angular measurements. """ @@ -295,6 +280,21 @@ class AngularMeasure(ZoomInteractorStyle): Publisher.sendMessage('Update slice viewer') +class PanMoveInteractorStyle(ZoomInteractorStyle): + """ + Interactor style responsible for translate the camera. + """ + def __init__(self): + ZoomInteractorStyle.__init__(self) + self.AddObserver("MouseMoveEvent", self.OnPanMove) + + def OnPanMove(self, obj, evt): + print "PAN" + if self.left_pressed: + obj.Pan() + obj.OnRightButtonDown() + + class ViewerStyle: def __init__(self): self.interactor = None diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index a8f8710..4721afd 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -206,13 +206,13 @@ class Viewer(wx.Panel): self.interactor.Render() elif state == const.STATE_MEASURE_DISTANCE: - style = styles.LinearMeasure(self.orientation, self.slice_data) + style = styles.LinearMeasureInteractorStyle(self.orientation, self.slice_data) self.style = style self.interactor.SetInteractorStyle(style) self.interactor.Render() elif state == const.STATE_MEASURE_ANGLE: - style = styles.AngularMeasure(self.orientation, self.slice_data) + style = styles.AngularMeasureInteractorStyle(self.orientation, self.slice_data) self.style = style self.interactor.SetInteractorStyle(style) self.interactor.Render() -- libgit2 0.21.2