Commit 445361ed authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot
Browse files

Merge topic 'alt-key'

cb280002

 Set the Alt key state in vtkRenderWindowInteractor
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: default avatarDavid E DeMarle <dave.demarle@kitware.com>
Merge-request: !1129
parents a8c25a3c cb280002
......@@ -112,6 +112,7 @@ bool QVTKInteractorAdapter::ProcessEvent(QEvent* e, vtkRenderWindowInteractor* i
(e2->modifiers() & Qt::ShiftModifier ) > 0 ? 1 : 0,
0,
e2->type() == QEvent::MouseButtonDblClick ? 1 : 0);
iren->SetAltKey((e2->modifiers() & Qt::AltModifier) > 0 ? 1 : 0);
if(t == QEvent::MouseMove)
{
......@@ -237,6 +238,7 @@ bool QVTKInteractorAdapter::ProcessEvent(QEvent* e, vtkRenderWindowInteractor* i
(e2->modifiers() & Qt::ControlModifier),
(e2->modifiers() & Qt::ShiftModifier),
ascii_key, e2->count(), keysym);
iren->SetAltKey((e2->modifiers() & Qt::AltModifier) > 0 ? 1 : 0);
if(t == QEvent::KeyPress)
{
......@@ -263,6 +265,7 @@ bool QVTKInteractorAdapter::ProcessEvent(QEvent* e, vtkRenderWindowInteractor* i
iren->SetEventInformationFlipY(e2->x(), e2->y(),
(e2->modifiers() & Qt::ControlModifier) > 0 ? 1 : 0,
(e2->modifiers() & Qt::ShiftModifier ) > 0 ? 1 : 0);
iren->SetAltKey((e2->modifiers() & Qt::AltModifier) > 0 ? 1 : 0);
this->AccumulatedDelta += e2->delta();
const int threshold = 120;
......@@ -299,6 +302,7 @@ bool QVTKInteractorAdapter::ProcessEvent(QEvent* e, vtkRenderWindowInteractor* i
iren->SetEventInformationFlipY(e2->x(), e2->y(),
(e2->modifiers() & Qt::ControlModifier) > 0 ? 1 : 0,
(e2->modifiers() & Qt::ShiftModifier ) > 0 ? 1 : 0);
iren->SetAltKey((e2->modifiers() & Qt::AltModifier) > 0 ? 1 : 0);
// invoke event and pass qt event for additional data as well
iren->InvokeEvent(QVTKInteractor::ContextMenuEvent, e2);
......
Markdown is supported
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