Mercurial > hg > svgui
comparison view/Pane.cpp @ 870:0cdaf382f21e tonioni
Discard wildly excessive wheel events
author | Chris Cannam |
---|---|
date | Mon, 10 Nov 2014 09:54:20 +0000 |
parents | 59a22f3bf86d |
children | 9855fc0927af a3b3b64fbc43 78e041e45ff0 |
comparison
equal
deleted
inserted
replaced
869:6c08e99ca0f3 | 870:0cdaf382f21e |
---|---|
2284 } else { | 2284 } else { |
2285 | 2285 |
2286 // Coarse wheel information (or vertical zoom, which is | 2286 // Coarse wheel information (or vertical zoom, which is |
2287 // necessarily coarse itself) | 2287 // necessarily coarse itself) |
2288 | 2288 |
2289 // Sometimes on Linux we're seeing absurdly extreme angles on | |
2290 // the first wheel event -- discard those entirely | |
2291 if (abs(m_pendingWheelAngle) > 1000) { | |
2292 m_pendingWheelAngle = 0; | |
2293 return; | |
2294 } | |
2295 | |
2289 while (abs(m_pendingWheelAngle) >= 120) { | 2296 while (abs(m_pendingWheelAngle) >= 120) { |
2290 | 2297 |
2291 int sign = (m_pendingWheelAngle < 0 ? -1 : 1); | 2298 int sign = (m_pendingWheelAngle < 0 ? -1 : 1); |
2292 | 2299 |
2293 if (horizontal) { | 2300 if (horizontal) { |