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

Mark layers as dirty when their reference frame's mean radius changes #205

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

Carifio24
Copy link
Member

Currently, when a reference frame's mean radius is updated, its layers are not redrawn. This seems to be one of the causes of the problem in #198. While the distance of the points from the center is modified appropriately, the positions of points in some layers depend on the frame's mean radius in a non-linear fashion. These layers will thus display incorrectly until another action (such as closing the layer properties window) marks the layer as "dirty". This PR fixes this issue by marking each of a reference frame's layers as dirty when the frame's mean radius is updated in the UI.

I think there are two points worth mentioning here:

  • As far as I can tell, the mean radius is the only property that affects layer display in this way, so the added piece of code only checks the layer's mean radius to avoid any unnecessary re-draws.
  • I debated walking through the tree of child reference frames and flagging their layers as well, but I couldn't find any dependence on parent reference frames inside of layers, so I don't think this is necessary.

@pkgw pkgw merged commit ad0ac45 into WorldWideTelescope:master Feb 1, 2022
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