Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirmation dialog not shown if users exit measure script dialog with esc #799

Open
alexdewar opened this issue Mar 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@alexdewar
Copy link
Collaborator

alexdewar commented Mar 11, 2025

I've confirmed that this is a bug, at least on my Linux machine -- presumably it's the same on Windows but it would be good to double-check this (and to double-check that any fix definitely works on Windows).

The ScriptRunDialog class overrides the closeEvent method so that we can show users a confirmation dialog if they try to close it while the measure script is still running, to make sure they don't accidentally terminate their experiment prematurely. Bizarrely though, it seeems that you can close the dialog by pressing esc and if you do so then the closeEvent method is never invoked and so the measure script will be stopped without asking for user confirmation.

We should ask for confirmation if the user presses esc too. It might also be worth seeing if there are any other key combinations that will close the dialog without confirmation.

ALSO: I've noticed that "yes" is the default option in the confirmation dialog, so if the user accidentally presses enter at this point, it will stop the measure script. No/cancel should be the default.

@alexdewar alexdewar added the bug Something isn't working label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant