Arch: import from draftutils instead of DraftTools

These functions were moved from DraftTools and DraftGui
to individual modules precisely to make them easy to import.
Otherwise we have to import the entire DraftTools and DraftGui
modules which creates dependency problems when we want to use
some functions without the graphical interface.
This commit is contained in:
vocx-fc
2020-02-10 22:50:36 -06:00
committed by Yorik van Havre
parent a150b3048d
commit ffb802d72c
2 changed files with 3 additions and 2 deletions

View File

@@ -27,7 +27,8 @@ from FreeCAD import Vector
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtGui,QtCore
from DraftTools import translate, utf8_decode
from draftutils.translate import translate
from draftutils.utils import utf8_decode
else:
# \cond
def translate(ctxt,txt):

View File

@@ -28,7 +28,7 @@ from FreeCAD import Vector
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtGui,QtCore
from DraftTools import translate
from draftutils.translate import translate
from PySide.QtCore import QT_TRANSLATE_NOOP
else:
# \cond