jimy-byerley / pymadcad

Simple yet powerful CAD (Computer Aided Design) library, written with Python.
https://madcad.netlify.app/
GNU Lesser General Public License v3.0
210 stars 16 forks source link

view navigation is locked in rotation mode after switching window #109

Closed jimy-byerley closed 4 weeks ago

jimy-byerley commented 4 weeks ago

This has been a known bug for a long time, sometimes after switching window with Alt+Tab shortcut, the view rotation mode stays in rotation mode without the alt key pressed. This can be put to normal again by pressing alt again when getting back in the view

This is because Qt never sends a release key event. And relying on key events was choosen because PyQt doesn't seem to properly generate the key modifiers values (it always remains at value 0 during mouse events even when keys are actually being held)