Commit 88fe930f156968916c77b789a5acfded93bd4988
1 parent
58ec7c3a
Exists in
interactor_style
Cleaning unneeded code related to the zoom
Showing
1 changed file
with
0 additions
and
27 deletions
Show diff stats
invesalius/data/viewer_slice.py
| ... | ... | @@ -256,12 +256,6 @@ class Viewer(wx.Panel): |
| 256 | 256 | "EnterEvent": self.OnEnterInteractor, |
| 257 | 257 | "LeaveEvent": self.OnLeaveInteractor |
| 258 | 258 | }, |
| 259 | - const.STATE_ZOOM: | |
| 260 | - { | |
| 261 | - "MouseMoveEvent": self.OnZoomMoveLeft, | |
| 262 | - "LeftButtonPressEvent": self.OnZoomLeftClick, | |
| 263 | - "LeftButtonReleaseEvent": self.OnVtkRightRelease | |
| 264 | - }, | |
| 265 | 259 | const.SLICE_STATE_SCROLL: |
| 266 | 260 | { |
| 267 | 261 | "MouseMoveEvent": self.OnChangeSliceMove, |
| ... | ... | @@ -321,10 +315,6 @@ class Viewer(wx.Panel): |
| 321 | 315 | style.AddObserver("MouseWheelForwardEvent",self.OnScrollForward) |
| 322 | 316 | style.AddObserver("MouseWheelBackwardEvent", self.OnScrollBackward) |
| 323 | 317 | |
| 324 | - if ((state == const.STATE_ZOOM) or (state == const.STATE_ZOOM_SL)): | |
| 325 | - self.interactor.Bind(wx.EVT_LEFT_DCLICK, self.OnUnZoom) | |
| 326 | - #else: | |
| 327 | - #self.interactor.Bind(wx.EVT_LEFT_DCLICK, self.OnUnspinPan) | |
| 328 | 318 | |
| 329 | 319 | # Measures are using vtkPropPicker because they need to get which actor |
| 330 | 320 | # was picked. |
| ... | ... | @@ -373,9 +363,6 @@ class Viewer(wx.Panel): |
| 373 | 363 | def OnLeftClick(self, evt, obj): |
| 374 | 364 | self.left_pressed = 1 |
| 375 | 365 | |
| 376 | - def OnZoomLeftClick(self, evt, obj): | |
| 377 | - evt.StartDolly() | |
| 378 | - | |
| 379 | 366 | def OnReleaseLeftButton(self, evt, obj): |
| 380 | 367 | self.left_pressed = 0 |
| 381 | 368 | Publisher.sendMessage('Update slice viewer') |
| ... | ... | @@ -425,23 +412,9 @@ class Viewer(wx.Panel): |
| 425 | 412 | def OnPanClick(self, evt, obj): |
| 426 | 413 | evt.StartPan() |
| 427 | 414 | |
| 428 | - def OnZoomMoveLeft(self, evt, obj): | |
| 429 | - if self.left_pressed: | |
| 430 | - evt.Dolly() | |
| 431 | - evt.OnRightButtonDown() | |
| 432 | - | |
| 433 | 415 | def OnVtkRightRelease(self, evt, obj): |
| 434 | 416 | evt.OnRightButtonUp() |
| 435 | 417 | |
| 436 | - def OnUnZoom(self, evt, obj = None): | |
| 437 | - mouse_x, mouse_y = self.interactor.GetLastEventPosition() | |
| 438 | - ren = self.interactor.FindPokedRenderer(mouse_x, mouse_y) | |
| 439 | - slice_data = self.get_slice_data(ren) | |
| 440 | - ren.ResetCamera() | |
| 441 | - ren.ResetCameraClippingRange() | |
| 442 | - #self.Reposition(slice_data) | |
| 443 | - self.interactor.Render() | |
| 444 | - | |
| 445 | 418 | def OnEnterInteractor(self, evt, obj): |
| 446 | 419 | if (self.slice_.buffer_slices[self.orientation].mask is None): |
| 447 | 420 | return | ... | ... |