View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013323VTK(No Category)public2012-07-24 10:442016-08-12 09:55
Reporteredice 
Assigned ToWill Schroeder 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version5.8.0 
Target VersionFixed in Version 
Summary0013323: vtkInteractorStyle.cxx uses outdated EventPosition
DescriptionIn this code from vtkInteractorStyle.cxx:
    case 'f' :
    case 'F' :
      {
      if(this->CurrentRenderer!=0)
        {
        this->AnimState = VTKIS_ANIM_ON;
        vtkAssemblyPath *path = NULL;
        this->FindPokedRenderer(rwi->GetEventPosition()[0],
                                rwi->GetEventPosition()[1]);


The InteractorStyle is responding to a key press, and is using "EventPosition" to determine the poked renderer and the pick coordinate.

However, in QVTKInteractorAdapter.cxx (and also likely in the equivalent for MFC, Cocoa, etc) this is what is done in response to a key press:

iren->SetKeyEventInformation(
      (e2->modifiers() & Qt::ControlModifier),
      (e2->modifiers() & Qt::ShiftModifier),
      ascii_key, e2->count(), keysym);

SetKeyEventInformation() does everything except set EventPosition.
So the interactor style is using an EventPosition that was set during the last MouseMove or other mouse event.

That is normally ok, unless the mouse is moved outside the widget. The widget still has the focus and receives key presses, but EventPosition is left at the last known mouse position (at the point it left the window).


Fixes:
a)
Instead, the key event should call SetEventInformation() with the current mouse cursor position (from QCursor::pos(), converted to widget coords).

b)
The InteractorStyle should not use EventPosition, but instead use a mechanism to query the current mouse position.
Tagshackaton, Interaction
ProjectTBD
Typeincorrect functionality
Attached Files

 Relationships

  Notes
(0033485)
Will Schroeder (manager)
2014-10-02 12:57
edited on: 2014-10-02 12:57

Postponed for review when we redesign VTK widgets and interactors (added Interaction tag)

(0036266)
Berk Geveci (administrator)
2016-07-06 16:48

Setting to status of bugs that have not been updated in the last year to expired. Please re-open if still important.
(0036321)
edice (reporter)
2016-07-07 05:13

This is still important, was stated that it would be reviewed in the future... still waiting for the review... people are busy, I understand, so please leave this issue open until it can be processed.
(0036322)
edice (reporter)
2016-07-07 05:13

How do I un-expire this issue?
(0036324)
Dave DeMarle (administrator)
2016-07-07 07:59

Should be a "Change status to:" dropdown above. Perhaps permission levels prevent your from accessing it. One oddity is that in the subsequent dialog, Mantis says "issue expired" instead of "issue backlog" when you do change it, but despite the text the state changes correctly.
(0036518)
edice (reporter)
2016-07-14 23:15

Thanks for the tip Dave
(0036631)
Cory Quammen (developer)
2016-07-27 11:20

edice, would you be willing to contribute a patch via our gitlab review process?

https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md [^]

You are likely now the expert on these particular pieces of VTK code, so a merge request on gitlab would be most welcome.
(0037290)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2012-07-24 10:44 edice New Issue
2014-10-02 09:31 Will Schroeder Assigned To => Will Schroeder
2014-10-02 10:03 Will Schroeder Tag Attached: hackaton
2014-10-02 12:52 Will Schroeder Tag Attached: Interaction
2014-10-02 12:57 Will Schroeder Note Added: 0033485
2014-10-02 12:57 Will Schroeder Note Edited: 0033485
2016-07-06 16:48 Berk Geveci Status backlog => expired
2016-07-06 16:48 Berk Geveci Note Added: 0036266
2016-07-07 05:13 edice Note Added: 0036321
2016-07-07 05:13 edice Note Added: 0036322
2016-07-07 07:59 Dave DeMarle Note Added: 0036324
2016-07-07 07:59 Dave DeMarle Status expired => backlog
2016-07-07 07:59 Dave DeMarle Resolution open => reopened
2016-07-14 23:15 edice Note Added: 0036518
2016-07-27 11:20 Cory Quammen Note Added: 0036631
2016-08-12 09:55 Kitware Robot Note Added: 0037290
2016-08-12 09:55 Kitware Robot Status backlog => closed
2016-08-12 09:55 Kitware Robot Resolution reopened => moved


Copyright © 2000 - 2018 MantisBT Team