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

Add graphics capabilities to handle new features in Inspector.py #1267

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lisham2000
Copy link
Contributor

No description provided.

Copy link
Collaborator

@cmeyer cmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it may make things easier to make the following changes:

  • assume line width is always a positive float, >= 0.
  • use the None-ness of fill_style and stroke_style to determine whether they are enabled

Doing these two changes will eliminate the redundant new persistent fields is_stroke_enabled and is_fill_enabled, although you might still want to implement them as observable properties dependent on stroke_style and fill_style. This has the downside that disabling and then re-enabling them will lose their particular value; but it will simplify the code for now. We can address the disable/enable workflow in the future.

@lisham2000
Copy link
Contributor Author

@cmeyer Agree in hindsight keeping the float value as a float and not an optional means less downstream changes and means no PR is needed for nionUI. This downstream problem was only discovered when testing backwards compatibility with Kev when it had already been implemented and we discussed whether it was sensible to change and were on the fence about it so if you think going for a simpler solution is better for now will update and put through.

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.

2 participants