Comment 19 for bug 816739

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 816739] Re: kicad warps mouse

I don't have your problem on 64 bit Debian testing with wxWidgets 2.8.12.
wxWidgets 2.9 is an experimental branch of wxWidgets and may contain bugs that
do not exist in the 2.8 branch. KiCad only uses 2.9 on Windows builds because
it solves some rendering issues when the zoom value is not an integer. The
code you are referring to is not the scrolling code. It is the automatic
panning code that adjusts the scroll bars as you attempt to move an object
outside the drawing area. The code you are looking for is
EDA_DRAW_FRAME::::AdjustScrollBars() in common/drawframe.cpp. However, given
that this code works correctly in Windows with wxWidgets 2.9.2 and on Linux
with wxWidgets 2.8.12, I guessing the problem lies in the scrolling or device
context (use to convert between device and logical units when warping the mouse
pointer) code for the Linux version of wxWidgets 2.9. Your best bet would be
to compile against wxWidgets 2.8.12 and see if the problem still exists. If it
goes away, the problem is in wxWidgets 2.9.2 and then you will be
troubleshooting wxWidgets not KiCad.

On 10/31/2011 1:36 PM, iu1j4 wrote:
> I run kicad bzr version on Slackware64 linux with wxWidgets-2.9.2 and gcc-4.6.2
> I did some more tests, and for example zoomin works ok, but after that i roll wheel to
> do zoomout (one step) and after that mouse pointer goes to left upper corner of the window.
> When I move it again to center of the window, then zomm out works ok.
> If I do that holding mouse in my hand and move it a bit then it go out of the window.
> Without touching mouse (just zomming out without move).
> I would like to fix it, but I don't know kicad code structure.
> Why do You mix vertical position with horizontal in one if/else if/else construction?
> Are You shure that bellow code in drawpanel.cpp is correct?
> 286
> if( screenPos.y < clientRect.GetTop() )
> 287
> y -= m_scrollIncrementY * yPpu;
> 288
> else if( screenPos.y > clientRect.GetBottom() )
> 289
> y += m_scrollIncrementY * yPpu;
> 290
> else if( clientRect.GetRight() < screenPos.x )
> 291
> x += m_scrollIncrementX * xPpu;
> 292
> else
> 293
> x -= m_scrollIncrementX * xPpu;
> If it is correct, where should I look to find zomming calculation function?
>