Skip to content

Commit

Permalink
BUG: Ensure handling of gesture triggers the "End" event
Browse files Browse the repository at this point in the history
This follows up on Kitware/VTK@c07e01864 (ENH: Generalize handling of
complex gesture events in VR) where the input check based of
"vtkEventDataDeviceInput::Grip" was removed from HandleComplexGestureEvents.
  • Loading branch information
jcfr committed Dec 21, 2023
1 parent 22eba9f commit 0fa6102
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions VirtualReality/MRML/vtkVirtualRealityViewInteractor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,13 @@ void vtkVirtualRealityViewInteractor::HandleComplexGestureEvents(vtkEventData* e
{
this->DeviceInputDownCount[this->PointerIndex] = 0;

if (edata->GetInput() == vtkEventDataDeviceInput::Grip)
if (this->CurrentGesture == vtkCommand::PinchEvent)
{
if (this->CurrentGesture == vtkCommand::PinchEvent)
{
//TODO: Execution never reaches here because even if the grip button was pressed (vtkEventDataDeviceInput::Grip = 4),
// edata->GetInput() always has the value 1.
this->EndPinchEvent();
}
this->CurrentGesture = vtkCommand::NoEvent;

return;
this->EndPinchEvent();
}
this->CurrentGesture = vtkCommand::NoEvent;

return;
}
}

Expand Down

0 comments on commit 0fa6102

Please sign in to comment.