-
Notifications
You must be signed in to change notification settings - Fork 78
ENH: indicate when a PyDMShellCommand's cmd is currently running by changing the button's appearance and disabling the button. #1249
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
base: master
Are you sure you want to change the base?
Conversation
9ebb8d5
to
6548ed1
Compare
2c28f19
to
2af0e43
Compare
can demo this by running |
one side-effect of this change is that now all shellcmd-buttons with even fast running cmds will flash the "(Running...)" text and other indicators for a brief moment. maybe the button should only indicate its running after a few seconds have passed? |
also seems the tests are failing b/c pyqt is cleaning up underlying C++ objects to soon??
not sure how to prevent this yet, looking into it |
2af0e43
to
25cf087
Compare
…hanging the button's appearance and disabling the button. this adds the following: - if allowMultipleExecutions is enabled, nothing different should happen. - but if not, then while cmd is running: - update button text to signify running, disable button, and switch to 'hour-glass' icon. - if multiple-cmd button, update top-button text (but keep enabled so can still use drop-down menu), disable all submenu items, and update icon and text of current running submenu item. - return button to previous state when cmd done running. - add long-running cmd as button and multiple-cmd drop-down so can try out new behavior. also make warning icon red color so more noticeable.
25cf087
to
34c3820
Compare
de85e5e
to
60c5a72
Compare
object deletion. error is: 'RuntimeError: wrapped C/C++ object of type PyDMShellCommand has been deleted', only when running tests all together. caused by the 2nd 'wait_until' and nothing seems prevent it. (pytest-qt issue maybe?)
this adds the following:
disable all submenu items, and update icon and text of current running submenu item.
also make warning icon red color so more noticeable.