← All bug reports

FS#803Pan and Zoom with touch pad are hard to use (wrong buffer handling)

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
Development
Operating system
Mac OS X Lion
Reported
2013-04-29 by matthiaswm
Closed
2013-05-04 by andrew

Version:
V 3.0.9 and earlier.

How to reproduce:
Go into App Preferences, in Graphics View->Navigation, enable pan gesture. Now add any drawing and pan around for ten seconds quickly, not taking the fingers off the mouse/touch pad. Take the fingers off the pad now.

What goes wrong:
QCad will pan around the drawing for another 30 seconds or so, dutifully executing all the buffered mouse moves.

Suggested solution:
Qt buffers more mouse pan-moves than QCad can handle. QCad executes every move in the buffer, making the pan feature close to unusable. The zoom function has the same bug, but it much less pronounced.

This is easily solved: when receiving a pan event (two finger scroll), just check if there are more events in the queue. If there are, accumulate the effect, but don't draw yet. As soon as the buffer is empty, kick off the redraw. The result is a *much* more fluent and responsive user interface.

Please fix soon. This wonderful feature makes life so easy, but currently it is unusable. Thanks. Matthias.

Comments (6)

andrew 2013-04-29

I'm unable to reproduce this behavior here with Mac OS X Mountain Lion and an official Apple "Trackpad" connected to an iMac. I tried with a relatively large drawing (20000 entities).
When letting go of the track pad, panning stops immediately.

What hardware are you using? Is this a Bluetooth track pad or an internal track pad of a laptop?

Thanks.

matthiaswm 2013-04-29

It's on a standard OS X Laptop (Macbook Pro w/ 10.8.3). The behaviour does *not* show when using the Pan Tool or teh CMD-Click to pan, only when using the two-finger gesture. It does not depend on the size of the drawing. And empty view does the same thing. See attached video. I only touch the touchpad for three seconds, doing a few circular moves. You may even be able to hear that... .

Awesome bug report response time, btw. Respect.

andrew 2013-04-29

only when using the two-finger gesture

That seems to make the difference. I assume you've changed the setting for "Graphics View" - "Navigation" - "Mouse wheel / two finger swipe" to "Scroll" then.

To pan, I proceed as follows: I am putting one finger on the track pad and hold it there for maybe 0.5sec and then move the finger to pan.

The two finger swipe has a 'lag' indeed.

matthiaswm 2013-04-29

only when using the two-finger gesture

Yes, indeed. The 0.5 second finger gesture is a nice workaround though. Neat.

BTW, I sent EMails to you as well. All the questions are answered by now. The scripting interface seems to cover most if not all.

andrew 2013-04-29

Please find attached a potential quick fix, although it is not ideal since the check for pending events is not limited to wheel events (note that Qt receives two finger swipes as wheel events, not as gesture events).

The file replaces scripts/Navigation/DefaultNavigation/DefaultNavigation.js and has been tested with QCAD 3.0.0 and QCAD 3.0.9 (development snapshot).

matthiaswm 2013-04-29

Works for me. If I see irregularities (I have a big drawing ahead), I will let you know. Thanks so much!

Closure comment

Likely fixed. Fix can probably be improved.