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

PathOpGui.py Turning Addon edit. #7269

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathOpGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ def Create(res):
that is created in each operations Gui implementation."""
FreeCAD.ActiveDocument.openTransaction("Create %s" % res.name)
try:
obj = res.objFactory(res.name, obj=None, parentJob=res.job)
obj = res.objFactory(res.name, obj=None)#, parentJob=res.job)
Copy link
Contributor

@mlampert mlampert Aug 2, 2022

Choose a reason for hiding this comment

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

Sorry for being late to the party. This is not the best way of avoiding the issue and this change breaks creation of ops when there are multiple jobs in a single file.

The much better, and correct way of dealing with the issue is add the parentJob named parameter to all the Create(..) functions of the Ops in FreeCAD_Turning_Addon .

FYI: the additional parameters for Create(..) came in ~ a year ago with PR #4797

Copy link
Contributor

Choose a reason for hiding this comment

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

if obj.Proxy:
obj.ViewObject.Proxy = ViewProvider(obj.ViewObject, res)
obj.ViewObject.Visibility = True
Expand Down