Comment 18 for bug 816739

Revision history for this message
iu1j4 (y0g1) 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?