Skip to content

Commit

Permalink
Arch: import from draftutils instead of DraftTools
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vocx-fc authored and yorikvanhavre committed Mar 23, 2020
1 parent a150b30 commit ffb802d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Mod/Arch/ArchCommands.py
Expand Up @@ -27,7 +27,8 @@
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):
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Arch/ArchComponent.py
Expand Up @@ -28,7 +28,7 @@
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
Expand Down

0 comments on commit ffb802d

Please sign in to comment.