Draft: Fixed 0.18.1 bug in DXF importer

This commit is contained in:
Yorik van Havre
2019-05-02 16:09:36 -03:00
parent 107fa5ae28
commit e98bb1fc21

View File

@@ -89,22 +89,13 @@ 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"))
@@ -112,17 +103,7 @@ http://www.freecadweb.org/wiki/Dxf_Importer_Install""")
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