Commit d4f3b840 authored by David Gobbi's avatar David Gobbi
Browse files

BUG: Fix track-pad scrolling action for OS X Cocoa.

The Apple track pad generates scrollWheel events for a two-fingered drag.
However, the track pad generates many more of these events than a real
scroll wheel, but for most events the "delta" is zero and only every or
so event has a non-zero delta, this emulates the "click click click"
scrolling of a typical scroll wheel.  VTK was treating the zero delta
values as negative deltas, instead of ignoring them.

Change-Id: I4030ad9fbbf675d5298c3cf4322e489a127e5e26
parent be64234e
...@@ -582,7 +582,7 @@ static const char *vtkMacKeyCodeToKeySymTable[128] = { ...@@ -582,7 +582,7 @@ static const char *vtkMacKeyCodeToKeySymTable[128] = {
{ {
interactor->InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL); interactor->InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL);
} }
else else if( [theEvent deltaY] < 0)
{ {
interactor->InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL); interactor->InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL);
} }
Supports Markdown
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