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

Fix setting rotation-angle and opacity from a callback #3077

Merged
merged 1 commit into from Jul 11, 2023

Conversation

ogoffart
Copy link
Member

... if they are not set as actual binding before

As reported in #3068

The problem is that the pass will properly create the Rotation or Opacity item, but will not create the two way binding if there is no existing binding. This causes code like img.rotation-angle = ... to change the rotation angle of the image, but not its parent Rotation item.
Fix it by making sure there is always a binding.

Since the change only affect visual representation, I abused one of the screenshot test to test this feature. And I also patched another bug that some #[allow(unused_parens)] was not set in the 'init' callback and would cause a warning in the test

... if they are not set as actual binding before

As reported in #3068

The problem is that the pass will properly create the Rotation or
Opacity item, but will not create the two way binding if there is no
existing binding. This causes code like `img.rotation-angle = ...` to
change the rotation angle of the image, but not its parent Rotation
item.
Fix it by making sure there is always a binding.

Since the change only affect visual representation, I abused one of the
screenshot test to test this feature. And I also patched another bug
that some #[allow(unused_parens)] was not set in the 'init' callback and
would cause a warning in the test
@ogoffart ogoffart requested a review from tronical July 10, 2023 14:33
Copy link
Member

@tronical tronical left a comment

Choose a reason for hiding this comment

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

Sounds worth an entry in the ChangeLog :)

@ogoffart ogoffart added the candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran label Jul 10, 2023
@ogoffart ogoffart merged commit 81e5d3b into master Jul 11, 2023
26 checks passed
@ogoffart ogoffart deleted the olivier/fix-3068 branch July 11, 2023 18:07
@ogoffart ogoffart removed the candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran label Sep 4, 2023
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.

None yet

2 participants