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 AVP1012 warnings in Avalonia.Base #13717

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

MrJul
Copy link
Member

@MrJul MrJul commented Nov 23, 2023

What does the pull request do?

This PR fixes all AVP1012 ("use SetCurrentValue") warnings in Avalonia.Base.

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

PolylineSegment constructor: ignore the warning, which matches the other constructor.

TabItem.Header: I wasn't sure of the change at first, because AVP1012 in this file has been fixed (ead92a6) then reverted (6523320), both in PR #11029. After reading the PR comments, it appears the original fix was a little too broad, hence the revert, but I think the TabItem.Header one should have been kept.

I've added a unit test to confirm that setting the header through a style fails without the changes.

Pinging @maxkatz6 for confirmation

Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

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

Yes, SetCurrentValue on the header is safe.

@maxkatz6 maxkatz6 enabled auto-merge November 23, 2023 19:27
@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 23, 2023
Merged via the queue into AvaloniaUI:master with commit 18a3c43 Nov 23, 2023
@MrJul MrJul deleted the fix/avp1012-warnings-base branch November 23, 2023 22:01
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