Small bugfixes in Draft
+ Draft point is now disabled when no document is open + Fix in Draft DXF import
This commit is contained in:
parent
5496acdcf1
commit
1ba8d73933
|
@ -3604,6 +3604,12 @@ class Point:
|
|||
return {'Pixmap' : 'Draft_Point',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_Point", "Point"),
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Point", "Creates a point object")}
|
||||
|
||||
def IsActive(self):
|
||||
if FreeCADGui.ActiveDocument:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def Activated(self):
|
||||
self.view = FreeCADGui.ActiveDocument.ActiveView
|
||||
|
|
|
@ -1085,11 +1085,11 @@ def processdxf(document,filename):
|
|||
if fmt.makeBlocks:
|
||||
addToBlock(s,lay)
|
||||
else:
|
||||
newob = doc.addObject("Part::Feature","Hatch")
|
||||
newob.Shape = s
|
||||
newob = addObject(s,"Hatch",lay)
|
||||
if gui:
|
||||
fmt.formatObject(newob,hatch)
|
||||
else:
|
||||
newob = Draft.makeWire(points)
|
||||
if newob:
|
||||
locateLayer(lay).addObject(newob)
|
||||
if gui:
|
||||
fmt.formatObject(newob,hatch)
|
||||
|
|
Loading…
Reference in New Issue
Block a user