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

don't ever change the call_button text silly #180

Merged
merged 2 commits into from
Mar 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions magicgui/widgets/_function_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,9 @@ def _disable_button_and_call(val):
# disable the call button until the function has finished
self._call_button = cast(PushButton, self._call_button)
self._call_button.enabled = False
t, self._call_button.text = self._call_button.text, "Running..."
try:
self.__call__()
finally:
self._call_button.text = t
self._call_button.enabled = True

self._call_button.changed.connect(_disable_button_and_call)
Expand Down