From e98bb1fc217a1664b5c0c4688d66b1985e092e90 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Thu, 2 May 2019 16:09:36 -0300 Subject: [PATCH] Draft: Fixed 0.18.1 bug in DXF importer --- src/Mod/Draft/importDXF.py | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 6d965a18d2..ccdc7f1487 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -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