[wxVTK] Fwd: [ wxvtk-Bugs-2025027 ] incorrect SetEventInformationFlipY() in OnMouseWheel()
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2008-08-10 22:50:01
|
Fixed in CVS HEAD: $ cvs ci -m"BUG: Fix [ wxvtk-Bugs-2025027 ] incorrect SetEventInformationFlipY() in OnMouseWheel(), thanks to Mu Shang for patch" ~/Projects/wxVTK Checking in src/wxVTKRenderWindowInteractor.cxx; /cvsroot/wxvtk/wxVTK/src/wxVTKRenderWindowInteractor.cxx,v <-- wxVTKRenderWindowInteractor.cxx new revision: 1.37; previous revision: 1.36 done ---------- Forwarded message ---------- From: SourceForge.net <no...@so...> Date: Tue, Jul 22, 2008 at 10:06 PM Subject: [ wxvtk-Bugs-2025027 ] incorrect SetEventInformationFlipY() in OnMouseWheel() To: no...@so... Bugs item #2025027, was opened at 2008-07-22 16:06 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=669338&aid=2025027&group_id=114757 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: shang (mshang) Assigned to: Nobody/Anonymous (nobody) Summary: incorrect SetEventInformationFlipY() in OnMouseWheel() Initial Comment: The current (incorrect) code in OnMouseWheel() is: ''' //Set vtk event information ... The numebr of wheel rotations is stored in //the x varible. y varible is zero SetEventInformationFlipY(event.GetWheelRotation() / event.GetWheelDelta(), 0, event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); ''' And the correct code should be: ''' SetEventInformationFlipY(event.GetX(), event.GetY(), event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); ''' I don't know why the incorrect code was written like that, but it 1. does not conform to the implementation in vtkWin32RenderWindowInteractor, vtkXRenderWindowInteractor, vtkCocoaGLView, vtkCarbonRenderWindowInteractor, etc. 2. breaks many interactor styles that rely on the difference between the current event coordinate and the previous event coordinate: Consider this: The user is moving an actor by holding down middle button(mouse wheel button) in vtkInteractorStyleTrackballActor. He accidentally rotates the mouse wheel and the coordinates are set to (1,0) or similar. Then in the next mouse move event the event handler calculates the difference between the current coordinates with the previous coordinates - the difference would be big and it move the actor out of the visible scene. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=669338&aid=2025027&group_id=114757 -- Mathieu |