-
Notifications
You must be signed in to change notification settings - Fork 1k
fix #13305 Baseline SnapLines do not appear in DesignSurface #13324
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13324 +/- ##
===================================================
+ Coverage 61.34314% 62.58290% +1.23976%
===================================================
Files 1547 1560 +13
Lines 158479 159689 +1210
Branches 14751 14906 +155
===================================================
+ Hits 97216 99938 +2722
+ Misses 60561 58983 -1578
- Partials 702 768 +66
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Nice investigation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, please add unit test.
@Tanya-Solyanik Besides, I think the root of this issue resides with the misuse of property (SnapLinesInternal for SnapLines) |
Yes, could you please add a test for the rootcause - a test that ensures that the virtual method is called. I'll merger this PR to include this fix in the next preview, but please add a test in the next PR. |
/backport to release/9.0 |
Started backporting to release/9.0: https://github.com/dotnet/winforms/actions/runs/14608188769 |
…rface (#13349) Backport of #13324 to release/9.0 ## The cause of this issue This issue is caused by [PR10279](#10279) These are two of all changes make in [PR10279](#10279)  `BehaviorService`, `DragAssistanceManager` use `SnapLines` to add some effects during design time. `ControlDesigner` has a **_virtual_** property `SnapLines`, but most designers override the property, in other words, _**most designers have customized `SnapLines`**_ ### Code flow before [PR10279](#10279) when `BehaviorService` or `DragAssistanceManager` accesses `SnapLines` , customized `SnapLines` were returned. ### Code flow after [PR10279](#10279) when `BehaviorService` or `DragAssistanceManager` **_accesses `SnapLinesInternal`_** , **_customized `SnapLines` were skipped._** ## Proposed changes - - Use `SnapLines` - <!-- ## Customer Impact - - ## Regression? - Yes / No ## Risk - --> ## Screenshots ### Before  ### After  ## Test methodology - - manually -
fix #13305
The cause of this issue
This issue is caused by PR10279
These are two of all changes make in PR10279

BehaviorService
,DragAssistanceManager
useSnapLines
to add some effects during design time.ControlDesigner
has a virtual propertySnapLines
, but most designers override the property, in other words, most designers have customizedSnapLines
Code flow before PR10279
when
BehaviorService
orDragAssistanceManager
accessesSnapLines
, customizedSnapLines
were returned.Code flow after PR10279
ControlDesigner.cs
when
BehaviorService
orDragAssistanceManager
accessesSnapLinesInternal
, customizedSnapLines
were skipped.Proposed changes
SnapLines
Screenshots
Before
After
Test methodology