Update src/Mod/Draft/draftguitools/gui_selectplane.py

Co-authored-by: 0penBrain <48731257+0penBrain@users.noreply.github.com>
This commit is contained in:
Yorik van Havre
2022-06-27 11:51:51 +02:00
committed by GitHub
parent d69888b74d
commit 27bfa083b2

View File

@@ -195,10 +195,7 @@ class Draft_SelectPlane:
sel = FreeCADGui.Selection.getSelectionEx()
if len(sel) == 1:
sel = sel[0]
if hasattr(sel.Object, 'TypeId') and sel.Object.TypeId == 'App::Part':
self.setPlaneFromObjPlacement(sel.Object)
return True
elif hasattr(sel.Object, "TypeId") and sel.Object.TypeId == "PartDesign::Plane":
if hasattr(sel.Object, 'TypeId') and (sel.Object.TypeId == 'App::Part' or sel.Object.TypeId == 'PartDesign::Plane'):
self.setPlaneFromObjPlacement(sel.Object)
return True
elif Draft.getType(sel.Object) == "Axis":