Add hooks so Gui classes can be seen by DXF importer
This commit is contained in:
committed by
Yorik van Havre
parent
aa1f75ef0e
commit
37e6c19a4b
@@ -2800,8 +2800,12 @@ def open(filename):
|
||||
doc = FreeCAD.newDocument(docname)
|
||||
doc.Label = docname
|
||||
FreeCAD.setActiveDocument(doc.Name)
|
||||
import Import
|
||||
Import.readDXF(filename)
|
||||
try:
|
||||
import ImportGui
|
||||
ImportGui.readDXF(filename)
|
||||
except Exception:
|
||||
import Import
|
||||
Import.readDXF(filename)
|
||||
Draft.convert_draft_texts() # convert annotations to Draft texts
|
||||
doc.recompute()
|
||||
|
||||
@@ -2842,8 +2846,12 @@ def insert(filename, docname):
|
||||
else:
|
||||
errorDXFLib(gui)
|
||||
else:
|
||||
import Import
|
||||
Import.readDXF(filename)
|
||||
try:
|
||||
import ImportGui
|
||||
ImportGui.readDXF(filename)
|
||||
except Exception:
|
||||
import Import
|
||||
Import.readDXF(filename)
|
||||
Draft.convert_draft_texts() # convert annotations to Draft texts
|
||||
doc.recompute()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user