ubarsc / tuiview

TuiView is a lightweight raster GIS with powerful raster attribute table manipulation abilities
http://tuiview.org/
GNU General Public License v2.0
28 stars 12 forks source link

Crashes on PyQt5 when mouse wheel is used #5

Closed gillins closed 7 years ago

gillins commented 7 years ago

Original report by Shuning Bian (Bitbucket: Steve, GitHub: Steve).


After loading a raster image use of the mouse wheel to zoom causes tuiview to crash immediately due to delta() being deprecated. Patch to fix this is attached, though I am not sure if the direction is correct, or if angleDelta() should be used over pixelDelta(). The hasattr check is probably also extraneous since PyQt5 is import explicitly.

gillins commented 7 years ago

Original comment by Sam Gillingham (Bitbucket: gillins, GitHub: gillins).


Thanks @freespace. I've committed a fix in 360dec0 that fixed a few other places as well. Let me know if you agree with these changes or not.

I've used angleDelta() since this seems to match what the old delta() call did in Qt4.

gillins commented 7 years ago

Original comment by Sam Gillingham (Bitbucket: gillins, GitHub: gillins).


Fixed in 360dec0

gillins commented 7 years ago

Original comment by Shuning Bian (Bitbucket: Steve, GitHub: Steve).


Looks good, thank for your the quick resolution.