-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Part: Rename AttachExtension::Support property - fixes #7052 #12714
Part: Rename AttachExtension::Support property - fixes #7052 #12714
Conversation
…to avoid name conflict with base features. Fixes FreeCAD#7052
PS I didn't update any of the numerous docstrings, I assume that happens on crowdin? |
are you talking about documentation in cpp/py files or in .ts files? The later is managed with crowdin but code documentation should be updated here. |
I meant the .ts files. I updated everywhere else. |
Let's ship it and keep an eye out for complaints to fix |
Are you MAD ? Do you know how many things depend on this ?
Who uses an attachment with a ShapeBinder ??? |
How would you solve this problem without it? |
YOUR solution to YOUR problem is to destroy every-body elses work ? |
THE solution to A problem... and it's fairly easy to adapt your code. I think something like this should work: |
How many people did have this "problem" that you talk about ? Where was it ever reported ? |
There are multiple forum threads and at least one github issue, linked right here in the PR comments. This is your third comment about things discussed for over a year and accessible through this very same page. I'm not sure why you don't want to read about it first before commenting. |
Wow, this is so stupid and will make FC even more unloved. |
i still love you freecad |
@jcoalson, ordinary love needs some proof occasionally to not perish, so let me introduce a challenge in file. In was created using 0.21.2: |
Which one? See #14429 too. |
Top most commit is |
Summary
Part: Rename
AttachExtension::Support
property toAttachmentSupport
, to avoid name conflict with base features, e.g.ShapeBinder
.Fixes #7052
The above bug is triggered when using the attach extension on a binder.
Details
When projects are saved, the scoping of object properties is lost, which means a class must be careful not to use the same name for a property as another class if the two classes can be composed via inheritance or extension into a single feature.
AttachExtension
andShapeBinder
currently conflict onSupport
. #12579 renamesShapeBinder
's but in discussion it was noted that sinceAttachExtension
is anApp::Extension
, it should be the one to avoid conflicts. This PR is longer due to the ubiquity of attachments, and trickier due to the lack of compile-type checking on the python side, but I think it's worth it.The approach taken here is to do a full migration instead of keeping a deprecated
Support
property around, which could get very confusing since attachments are so widely used.While I was there, I moved the migration for an old type change out of
Part2DObject
intoAttachExtension
where it belongs, which cleaned up some cruft.