Draft: legacy DXF importer: downloaded libs should be reloaded

Otherwise old versions will still be used in the current FreeCAD session.
This commit is contained in:
Roy-043
2024-04-28 15:33:15 +02:00
committed by Yorik van Havre
parent 9325a1cd5a
commit 4e908ee9bd

View File

@@ -197,8 +197,11 @@ def getDXFlibs():
if not libsok:
errorDXFLib(gui)
try:
import dxfColorMap, dxfLibrary, dxfReader
except ImportError:
import importlib
importlib.reload(dxfColorMap)
importlib.reload(dxfLibrary)
importlib.reload(dxfReader)
except Exception:
dxfReader = None
dxfLibrary = None
FCC.PrintWarning("DXF libraries not available. Aborting.\n")