Commit b4a359d6ebbd778f9cf4dcb23edeff9f79884344

Authored by Thiago Franco de Moraes
1 parent ea58ed7c
Exists in interactor_style

Using DefaultInteractorStyle to const.STATE_DEFAULT

Showing 1 changed file with 9 additions and 10 deletions   Show diff stats
invesalius/data/viewer_slice.py
@@ -175,23 +175,22 @@ class Viewer(wx.Panel): @@ -175,23 +175,22 @@ class Viewer(wx.Panel):
175 interactor.SetInteractorStyle(style) 175 interactor.SetInteractorStyle(style)
176 176
177 def SetInteractorStyle(self, state): 177 def SetInteractorStyle(self, state):
178 - if state == const.SLICE_STATE_CROSS:  
179 - style = styles.CrossInteractorStyle(self) 178 + if state == const.STATE_DEFAULT:
  179 + style = styles.DefaultInteractorStyle(self)
180 self.style = style 180 self.style = style
181 self.interactor.SetInteractorStyle(style) 181 self.interactor.SetInteractorStyle(style)
182 self.interactor.Render() 182 self.interactor.Render()
183 183
184 - ## Zoom using right button  
185 - #style.AddObserver("RightButtonPressEvent",self.OnZoomRightClick)  
186 - #style.AddObserver("MouseMoveEvent", self.OnZoomMoveRight)  
187 - #style.AddObserver("RightButtonReleaseEvent", self.OnVtkRightRelease)  
188 -  
189 - #Scroll change slice  
190 - style.AddObserver("MouseWheelForwardEvent",self.OnScrollForward)  
191 - style.AddObserver("MouseWheelBackwardEvent", self.OnScrollBackward) 184 + elif state == const.SLICE_STATE_CROSS:
  185 + style = styles.CrossInteractorStyle(self)
  186 + self.style = style
  187 + self.interactor.SetInteractorStyle(style)
192 188
193 self.__set_cross_visibility(1) 189 self.__set_cross_visibility(1)
194 Publisher.sendMessage('Activate ball reference') 190 Publisher.sendMessage('Activate ball reference')
  191 +
  192 + self.interactor.Render()
  193 +
195 elif state == const.STATE_WL: 194 elif state == const.STATE_WL:
196 self.on_wl = True 195 self.on_wl = True
197 self.wl_text.Show() 196 self.wl_text.Show()