← Back to team overview

kicad-developers team mailing list archive

Re: [OSX] Zoom and Verticalscroll events triggerd on mousescroll event


On 8/30/2011 2:21 PM, Jerry Jacobs wrote:
> Dear All,
> On OS X I face a problem when zooming/scrolling, because it is the same event
> that is triggered in kicad. Or the zooming or scrolling needs a modifier key
> before the operation can occur. Else it will queue zoom and scroll at the same
> time which is very annoying.

It is possible that OSX generates a scroll event when the scroll bars are
automatically set when zooming around the cursor on a mouse wheel event.  This
occurs in EDA_DRAW_FRAME::AdjustScrollBars().  If this is the case you may have
to figure out a way to ignore the generated scroll event or prevent OSX from
generating the event.  Try using a debug version of the wxWidgets library and
turn on event tracing by setting the WXTRACE environment variable to
wxTrace_Messages to see what events get generated when you move the mouse wheel
and click the scroll bars.  If you see a scroll bar event when you zoom with
the mouse wheel, than that is likely the problem.  How to fix it is another issue.

> We should have a look at:
> common/drawpanel.cpp:
>   289 void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event )
>   758 void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event )

The mouse wheel events are handled in common/drawpanel.cpp by:

757 void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event )


> I'm not sure how I get a modifier key inside the mouse/scroll events.
> Kind regards,
> Jerry
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp