Draft : Show dialog if DXF libraries not found/not downloadable
This commit is contained in:
parent
e551c4ef28
commit
c516b2456e
|
@ -84,7 +84,15 @@ if not libsok:
|
|||
p = None
|
||||
p = ArchCommands.download(baseurl+f,force=True)
|
||||
if not p:
|
||||
FreeCAD.Console.PrintWarning("Download of dxf libraries failed. Please download them manually from\nhttps://github.com/yorikvanhavre/Draft-dxf-importer\nand place them in your macros folder\n")
|
||||
message = ('Download of dxf libraries failed.\n'
|
||||
'Please download them manually from :\n'
|
||||
'https://github.com/yorikvanhavre/Draft-dxf-importer\n'
|
||||
'and place them in your macros folder.\n')
|
||||
if gui:
|
||||
from PySide import QtGui, QtCore
|
||||
QtGui.QMessageBox.information(None,"",message)
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(message)
|
||||
break
|
||||
progressbar.stop()
|
||||
|
||||
|
@ -95,11 +103,17 @@ if not libsok:
|
|||
dxfReader = None
|
||||
dxfLibrary = None
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning("The DXF import/export libraries needed by FreeCAD to handle the DXF format\n")
|
||||
FreeCAD.Console.PrintWarning("were not found on this system. Please either enable FreeCAD to download these\n")
|
||||
FreeCAD.Console.PrintWarning("libraries (menu Edit > Preferences > Import-Export > DXF > Enable downloads) or download\n")
|
||||
FreeCAD.Console.PrintWarning("these libraries manually, as explained on\n")
|
||||
FreeCAD.Console.PrintWarning("https://github.com/yorikvanhavre/Draft-dxf-importer\n")
|
||||
message = ('The DXF import/export libraries needed by FreeCAD to handle the DXF format'
|
||||
' were not found on this system.\nPlease either enable FreeCAD to download these'
|
||||
' libraries :\n 1 - Load Draft workbench\n'
|
||||
' 2 - Menu Edit > Preferences > Import-Export > DXF > Enable downloads)\n'
|
||||
'Or download these libraries manually, as explained on\n'
|
||||
'https://github.com/yorikvanhavre/Draft-dxf-importer\n')
|
||||
if gui:
|
||||
from PySide import QtGui, QtCore
|
||||
QtGui.QMessageBox.information(None,"",message)
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(message)
|
||||
dxfReader = None
|
||||
dxfLibrary = None
|
||||
|
||||
|
@ -1925,4 +1939,3 @@ def readPreferences():
|
|||
dxfFillMode = p.GetBool("fillmode",True)
|
||||
dxfBrightBackground = isBrightBackground()
|
||||
dxfDefaultColor = getColor()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user