Re: [wxVTK] Middle Mouse Button And Scroll Wheel Events
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2008-08-25 00:28:08
|
Applied: $ cvs di Index: wxVTKRenderWindowInteractor.cxx =================================================================== RCS file: /cvsroot/wxvtk/wxVTK/src/wxVTKRenderWindowInteractor.cxx,v retrieving revision 1.41 diff -u -r1.41 wxVTKRenderWindowInteractor.cxx --- wxVTKRenderWindowInteractor.cxx 13 Aug 2008 08:22:58 -0000 1.41 +++ wxVTKRenderWindowInteractor.cxx 25 Aug 2008 00:26:11 -0000 @@ -639,6 +639,9 @@ return; } + // See report by Shang Mu / Keery Lu on wxVTK mailing list + this->SetFocus(); + #if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) SetEventInformationFlipY(event.GetX(), event.GetY(), event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); $ cvs ci -m"ENH: Add SetFocus on OnButtonUp. Thanks to Shang Mu for patch, Kerry Loux for report." Checking in wxVTKRenderWindowInteractor.cxx; /cvsroot/wxvtk/wxVTK/src/wxVTKRenderWindowInteractor.cxx,v <-- wxVTKRenderWindowInteractor.cxx new revision: 1.42; previous revision: 1.41 done Thanks ! On Mon, Aug 4, 2008 at 2:58 AM, Kerry Loux <lo...@gm...> wrote: > I should have waited to try this before sending my previous message because > it was easy and took < 30 seconds. Shang, your suggestion fixed the problem > - I added SetFocus(); to the top of the OnButtonUp() function in wxVTK and > the problem went away. Thanks for the help! > > -Kerry > > On Sun, Aug 3, 2008 at 8:55 PM, Kerry Loux <lo...@gm...> wrote: >> >> I think I'm using wxVTK 1.30 (.cxx file is rev 1.30, .h file is rev 1.16). >> >> I have discovered the cause of the middle mouse button not working - it >> was my fault - the mouse's software configuration does not treat the middle >> mouse button as a middle mouse button by default. It was set to "zoom" >> (whatever that is...), but I put it to "middle mouse button" and all is well >> with the button events. >> >> The scroll events, however - this is what I've learned: >> >> The OnMouseWheel function in wxVTK is being called when I start the >> program and move the scroll wheel. I can zoom in and out just fine. After >> clicking on another control and then back on the wxVTK, the OnMouseWheel >> function is never called, no matter what direction I scroll the mouse of >> what combination of key presses and mouse clicks I try. >> >> Mathieu, I did implement the bug fix, but since the function isn't being >> called, it didn't help. I do like the changes it made to the scroll wheel >> functionality, though. It seems that the "/ event.GetWheelDelta()" was >> responsible for limiting the "zooming" capability. >> >> Shang, I'll try the SetFocus() fix and report back... >> >> Thanks for your help! >> >> -Kerry >> >> On Sun, Aug 3, 2008 at 6:21 PM, Mathieu Malaterre >> <mat...@gm...> wrote: >>> >>> What version of wxVTK are you using ? I cannot remember but I thought >>> at some point we had an issue with mouse wheel. Anyway, if you can get >>> wx to recognize mouse wheel event, there would be no reason why we >>> could not forward them to VTK. >>> >>> On a different subject a bug was recently submited: >>> >>> >>> https://sourceforge.net/tracker/?func=detail&atid=669338&aid=2025027&group_id=114757 >>> >>> donno if this help or not... >>> >>> HTH >>> -Mathieu >>> >>> On Sat, Aug 2, 2008 at 1:39 PM, Kerry Loux <lo...@gm...> wrote: >>> > Hello All, >>> > >>> > I've come across a couple of curious bugs that I can't seem to track >>> > down, >>> > and they're both related to my middle mouse button. My middle mouse >>> > button >>> > up/down events don't fire. I set a breakpoint at the >>> > wxVTKRenderWindowInteractor OnButtonDown() function and both the right >>> > and >>> > left mouse buttons cause the breakpoint to be reached, but I get >>> > nothing >>> > from the middle button. Is there something else I need to do to set >>> > this >>> > up? >>> > >>> > Also, I am having a similar problem with the scroll wheel. When I >>> > first >>> > start my app, I can use the scroll wheel just fine, but if I click on >>> > another control, then click back into the RenderWindow, the scroll >>> > wheel no >>> > longer functions. Same deal with the breakpoints - the event handler >>> > is >>> > never called. >>> > >>> > Any ideas on these? Has anyone else noticed this behavior? >>> > >>> > Thanks for your help! >>> > >>> > -Kerry >>> > >>> > >>> > ------------------------------------------------------------------------- >>> > This SF.Net email is sponsored by the Moblin Your Move Developer's >>> > challenge >>> > Build the coolest Linux based applications with Moblin SDK & win great >>> > prizes >>> > Grand prize is a trip for two to an Open Source event anywhere in the >>> > world >>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> > _______________________________________________ >>> > Wxvtk-users mailing list >>> > Wxv...@li... >>> > https://lists.sourceforge.net/lists/listinfo/wxvtk-users >>> > >>> > >>> >>> >>> >>> -- >>> Mathieu >> > > -- Mathieu |