Arch/Draft: Misc small fixes

* Properly handle offset2D and arch objects in Draft Stretch
* Allow the WP of Arch BuildingParts to stay weak
* Fixed Draft Edit making Wires not plane anymore
* Dont change the WP if already perpendicular to current view
* Fixed DXF import of Polyfaces
This commit is contained in:
Yorik van Havre
2018-12-10 10:21:17 -02:00
parent e1e86caac1
commit ee8f7be4e8
5 changed files with 97 additions and 15 deletions

View File

@@ -486,6 +486,8 @@ class ViewProviderBuildingPart:
vobj.addProperty("App::PropertyBool","RestoreView","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If set, the view stored in this object will be restored on double-click"))
if not "DiffuseColor" in pl:
vobj.addProperty("App::PropertyColorList","DiffuseColor","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The individual face colors"))
if not "AutoWorkingPlane" in pl:
vobj.addProperty("App::PropertyBool","AutoWorkingPlane","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If set to True, the working plane will be kept on Auto mode"))
def onDocumentRestored(self,vobj):
@@ -690,6 +692,9 @@ class ViewProviderBuildingPart:
FreeCAD.DraftWorkingPlane.save()
FreeCAD.DraftWorkingPlane.setFromPlacement(self.Object.Placement,rebase=True)
FreeCAD.DraftWorkingPlane.weak = False
if hasattr(self.Object.ViewObject,"AutoWorkingPlane"):
if self.Object.ViewObject.AutoWorkingPlane:
FreeCAD.DraftWorkingPlane.weak = True
if hasattr(FreeCADGui,"Snapper"):
FreeCADGui.Snapper.setGrid()
if hasattr(FreeCADGui,"draftToolBar"):