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

Move UI code for showing errors out of custom_rule.py. #240

Merged
merged 2 commits into from
May 6, 2024

Conversation

dlyongemallo
Copy link
Contributor

Incidentally, make the warning dialogs modal (see issue #156).

Incidentally, make the warning dialogs modal (see issue zxcalc#156).
@dlyongemallo
Copy link
Contributor Author

Two further questions:

  • check_rule returns a bool, but this is never used. Is this return value necessary?
  • check_rule is always called with show_error = True. Is this parameter necessary?

@jvdwetering
Copy link
Collaborator

I think the bool was originally intended to check if the operation succeeded. But since with this commit it instead raises an Exception, that no longer makes sense. Also with this behaviour, supressing the exceptions with show_error also makes less sense so that that parameter can be removed.

@dlyongemallo
Copy link
Contributor Author

Okay, I've removed both the parameter and the return value.

@jvdwetering jvdwetering merged commit aae8b09 into zxcalc:master May 6, 2024
2 checks passed
@hm919
Copy link

hm919 commented Jun 12, 2024

Has this fixed issue #156 ?

@dlyongemallo dlyongemallo deleted the check_rule_modal_error branch June 14, 2024 06:19
@dlyongemallo
Copy link
Contributor Author

The specific issue of show_error_msg not taking a parent has been fixed. It looks to me like all dialog functions defined in dialogs.py take a parent now. The aside about the API being inconsistent is still true, but that's mostly a cosmetic matter and I think we can close issue #156 now (or leave it open and rename it to "make dialogs more API consistent" or something like that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants