[Part Booleans] fix issue with copying visuals when doing Part workbench booleans using App::Part objects, see https://forum.freecad.org/viewtopic.php?t=91813&sid=eea2494d6d02882c3be7df74d7e2b689
This commit is contained in:
committed by
Yorik van Havre
parent
8b45901c5e
commit
1ca7760baa
@@ -103,10 +103,12 @@ class BOPFeatures:
|
||||
|
||||
def copy_visual_attributes(self, target, source):
|
||||
if target.ViewObject:
|
||||
target.ViewObject.ShapeAppearance = source.ViewObject.ShapeAppearance
|
||||
if hasattr(target.ViewObject,"ShapeAppearance") and hasattr(source.ViewObject, "ShapeAppearance"):
|
||||
target.ViewObject.ShapeAppearance = source.ViewObject.ShapeAppearance
|
||||
displayMode = source.ViewObject.DisplayMode
|
||||
src = source
|
||||
while displayMode == "Link":
|
||||
src = src.LinkedObject
|
||||
displayMode = src.ViewObject.DisplayMode
|
||||
target.ViewObject.DisplayMode = displayMode
|
||||
if displayMode in target.ViewObject.getEnumerationsOfProperty("DisplayMode"):
|
||||
target.ViewObject.DisplayMode = displayMode
|
||||
|
||||
Reference in New Issue
Block a user