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

Invalidate brush when transform changed event is fired #15098

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

Conversation

BAndysc
Copy link
Contributor

@BAndysc BAndysc commented Mar 24, 2024

What does the pull request do?

Brushes will be invalidated when their bound Transforms fire a Changed event.

What is the current behavior?

Brushes are not invalidated when their bound Transform is changed (not the property, but the inner matrix).

What is the updated/expected behavior with this PR?

Changes to bound transform will cause the brush to invalidate and redraw.

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

n/a

Obsoletions / Deprecations

n/a

Fixed issues

Fixes #15097

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0046487-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

oldMutableValue.Changed -= OnTransformChanged;

if (newValue is IMutableTransform newMutableValue)
newMutableValue.Changed += OnTransformChanged;
_resource.ProcessPropertyChangeNotification(change);
Copy link
Member

Choose a reason for hiding this comment

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

This method is supposed to properly handle the change notification including nested resource changes, so the fix is incorrect and will cause memory leaks if transform is reused

Copy link
Contributor Author

@BAndysc BAndysc Mar 24, 2024

Choose a reason for hiding this comment

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

Is there a client method to notify server if the resources change and need to be reserialized? Or is it a completely wrong approach?

Copy link
Member

Choose a reason for hiding this comment

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

Transform itself is supposed to notify the server about its changes. The bug is most likely on the server-side.

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

Successfully merging this pull request may close these issues.

Brushes ignore changes to Transform's changed event
4 participants