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
PD: Rename {Sub}ShapeBinder::Support properties - fixes #7052 #12579
Conversation
…roperties to ObjectSupport, to avoid name conflict with Part::AttachExtension::Support. Fixes FreeCAD#7052
PS I'm not a big fan of the word Support in this property name given the confusion it causes, but I don't know the project well enough to come up with an alternative. Now would be a good time to pick something better if needed though. |
I agree support is a bit confusing, @realthunder could you give some insight on what exactly this is supposed to represent? Seems to me like "Source" could be a more fitting name. Suggestions welcome on what this should be named |
Preferably something unique enough to not cause conflict in the future 😁 |
suggestions from chrisb on the forum:
That makes two people voting for Source 😉, Shape is a property that already exists so can't use it. Profile doesn't seem right to me. Any of the others is ok with me. |
I suggest to change |
It's funny, I took that exact same approach first (right down to the same name). But it required changing quite a bit more code and seemed like it would end up causing more migration headache given that migrated projects can't be used on old versions. I think the core problem is that when Document.xml is written, the scoping of properties is lost. The current code seems to works fine (properties stay members of their own objects in both C++ and Python land) right up to the point where you save and then reopen the project. |
PS I'd be happy to defer to a PR from you with the However this PR doesn't preclude also fixing |
Ugh, there seem to be assumptions in the code that a ShapeBinder is special kind of feature that can sometimes belong to a class of 'supported-by-sketch'-like features, all of which are assumed to have a E.g. after this patch, if I highlight a sketch in the tree view and create a shape binder, I get an exception (What is supposed to happen is the task window opens up with the Object ( This seems to be another reason to make the fix in |
@wwmayer I would appreciate also having your opinion on which property should be renamed here |
I suggest to follow RT's fix and change it in the |
for reference: however there's likely more to it than that |
@realthunder, trying to understand your commit... can I ask why you did not also update the property name on this line? https://github.com/realthunder/FreeCAD/blob/2022.06.25-edge/src/Mod/PartDesign/Gui/Command.cpp#L252 |
Likely I missed that bit. But since Datum does not have |
^ Superseded by #12714 |
Closing in favor of #12714 |
PartDesign: Rename
ShapeBinder::Support
andSubShapeBinder::Support
properties toObjectSupport
, to avoid name conflict withPart::AttachExtension::Support
.Fixes #7052
This bug is triggered when using the attach extension on a binder.
Hopefully the comments on
handleChangedPropertyName()
are self-explanatory, re: how legacy files are handled.