From 4ffeaabeb9a9b827eed7bd856bc1c1eb59ac07c6 Mon Sep 17 00:00:00 2001 From: Michele Mattioni Date: Wed, 8 Feb 2012 15:45:50 +0000 Subject: [PATCH] Using a try except caluse to support both methods --- mayavi/core/mouse_pick_dispatcher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mayavi/core/mouse_pick_dispatcher.py b/mayavi/core/mouse_pick_dispatcher.py index a4d6e2766..3cc709ead 100644 --- a/mayavi/core/mouse_pick_dispatcher.py +++ b/mayavi/core/mouse_pick_dispatcher.py @@ -165,7 +165,10 @@ def on_button_release(self, vtk_picker, event): if self._mouse_no_mvt: x, y = vtk_picker.GetEventPosition() for picker in self._active_pickers.values(): - picker.pick((x, y, 0), self.scene.scene.renderer) + try: + picker.pick((x, y, 0), self.scene.scene.renderer) + except TypeError: + picker.pick(x, y, 0, self.scene.scene.renderer) self._mouse_no_mvt = 0