Skip to content

Commit

Permalink
Draft: Fixed 0.18.1 bug in DXF importer
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed May 2, 2019
1 parent 107fa5a commit e98bb1f
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions src/Mod/Draft/importDXF.py
Expand Up @@ -89,40 +89,21 @@ def errorDXFLib(gui):
if gui:
from PySide import QtGui, QtCore
from DraftTools import translate
if float(FreeCAD.Version()[0]+"."+FreeCAD.Version()[1]) >= 0.17:
message = translate("Draft","""Download of dxf libraries failed.
message = translate("Draft","""Download of dxf libraries failed.
Please install the dxf Library addon manually
from menu Tools -> Addon Manager""")
else:
message = translate("Draft","""Download of dxf libraries failed.
Please download and install them manually.
See complete instructions at
http://www.freecadweb.org/wiki/Dxf_Importer_Install""")
QtGui.QMessageBox.information(None,"",message)
else:
FreeCAD.Console.PrintWarning("The DXF import/export libraries needed by FreeCAD to handle the DXF format are not installed.\n")
if float(FreeCAD.Version()[0]+"."+FreeCAD.Version()[1]) >= 0.17:
FreeCAD.Console.PrintWarning("Please install the dxf Library addon from Tools -> Addons Manager\n")
else:
FreeCAD.Console.PrintWarning("Please check https://github.com/yorikvanhavre/Draft-dxf-importer\n")
FreeCAD.Console.PrintWarning("Please install the dxf Library addon from Tools -> Addons Manager\n")
break
progressbar.stop()
sys.path.append(FreeCAD.ConfigGet("UserAppData"))
else:
if gui:
from PySide import QtGui, QtCore
from DraftTools import translate
if float(FreeCAD.Version()[0]+"."+FreeCAD.Version()[1]) >= 0.17:
message = translate('draft',"""The DXF import/export libraries needed by FreeCAD to handle
the DXF format were not found on this system.
Please either enable FreeCAD to download these libraries:
1 - Load Draft workbench
2 - Menu Edit > Preferences > Import-Export > DXF > Enable downloads
Or install the libraries manually by installing the dxf-Library addon
from menu Tools -> Addon Manager.
To enabled FreeCAD to download these libraries, answer Yes.""")
else:
message = translate('draft',"""The DXF import/export libraries needed by FreeCAD to handle
message = translate('draft',"""The DXF import/export libraries needed by FreeCAD to handle
the DXF format were not found on this system.
Please either enable FreeCAD to download these libraries:
1 - Load Draft workbench
Expand Down

0 comments on commit e98bb1f

Please sign in to comment.