labscript-suite-oldfinal1 / runmanager

runmanager is a graphical user interface (GUI) used to aid the compilation of labscript experiment scripts into hardware instructions to be executed on the hardware. Experiment parameters can be adjusted in the GUI, and lists of parameters can be used to create sequences of experiments, and scan over complex parameter spaces.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Keypresses are registered twice #59

Closed philipstarkey closed 6 years ago

philipstarkey commented 6 years ago

Original report (archived issue) by Russell Anderson (Bitbucket: rpanderson, GitHub: rpanderson).


Since Qt5 (pull request #9), keypress events have been registered twice. Below I have debugged this by adding logger.info lines to on_keyPress and on_keyRelease .

Pressing F5 once used to (up to and including e2b367f60e5fa8029309c1729645c7022d1c3c58) result in:

2018-05-30 17:07:41,486 INFO runmanager: on_keyPress: F5
2018-05-30 17:07:45,592 INFO runmanager: on_keyRelease: F5
2018-05-30 17:07:45,594 INFO runmanager: Engage
2018-05-30 17:07:45,595 INFO runmanager: Parsing globals...
2018-05-30 17:07:45,607 INFO runmanager: Making h5 files
2018-05-30 17:07:45,609 INFO runmanager: end engage

... but now results in (6459a3ca2ad93fbfd79edcb6dd114cc0b595a3d5 and beyond):

2018-05-30 17:10:28,493 INFO runmanager: on_keyPress: F5
2018-05-30 17:10:28,496 INFO runmanager: on_keyPress: F5
2018-05-30 17:10:30,209 INFO runmanager: on_keyRelease: F5
2018-05-30 17:10:30,210 INFO runmanager: Engage
2018-05-30 17:10:30,210 INFO runmanager: Parsing globals...
2018-05-30 17:10:30,415 INFO runmanager: Making h5 files
2018-05-30 17:10:30,417 INFO runmanager: end engage
2018-05-30 17:10:30,424 INFO runmanager: on_keyRelease: F5
2018-05-30 17:10:30,424 INFO runmanager: Engage
2018-05-30 17:10:30,424 INFO runmanager: Parsing globals...
2018-05-30 17:10:30,430 INFO runmanager: Making h5 files
2018-05-30 17:10:30,437 INFO runmanager: end engage

To properly intercept the QtCore.QEvent.KeyPress and not have it handled twice, notify of KeyPressQApplication should return 1 (or True) for relevant events SO.

philipstarkey commented 6 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Resolves issue #59 (each QtCore.QEvent.KeyPress and QtCore.QEvent.KeyRelease event was handled twice).

→ \<\<cset a67c0c20bdbc2450600a914b360b67be3e36b67d>>

philipstarkey commented 6 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Merged in cbillington/runmanager/QShortcuts (pull request #23)

Use QShortcuts for keyboard shortcuts, resolving issue #59

Approved-by: Russell Anderson russell.anderson@monash.edu

→ \<\<cset 63f9a822ad41e6ac5b9378de84bc029af5fcd96d>>

philipstarkey commented 6 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Use QShortcuts for keyboard shortcuts, resolving issue #59

→ \<\<cset 0a3768cd7a22e68ff62d265957e9cca956c65cbd>>

philipstarkey commented 6 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Merged in cbillington/runmanager/QShortcuts (pull request #23)

Use QShortcuts for keyboard shortcuts, resolving issue #59

Approved-by: Russell Anderson russell.anderson@monash.edu

→ \<\<cset 63f9a822ad41e6ac5b9378de84bc029af5fcd96d>>