From ffb802d72cd369d4bd9fc204cff1c85ceb6e6ceb Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Mon, 10 Feb 2020 22:50:36 -0600 Subject: [PATCH] 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. --- src/Mod/Arch/ArchCommands.py | 3 ++- src/Mod/Arch/ArchComponent.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index 6ae41c050a..67a778db1e 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -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): diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index f798171dbb..625a74fa81 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -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