From 2fdb1aeeff6efb81a83c2fbac1404b1fe6bc6718 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sun, 22 Feb 2015 21:29:34 -0300 Subject: [PATCH] Draft: do not show Draft Tray toolbar when importing only the Draft module --- src/Mod/Draft/Draft.py | 8 -------- src/Mod/Draft/DraftGui.py | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 68cb51645..73962437e 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -5313,11 +5313,3 @@ class _ViewProviderVisGroup: if vobj.Object.InList[0].isDerivedFrom("Drawing::FeaturePage"): vobj.Object.InList[0].touch() - - - -#----End of Python Features Definitions----# - -if gui: - if not hasattr(FreeCADGui,"Snapper"): - import DraftSnap diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index 412c6f974..95349527d 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -1791,3 +1791,7 @@ class DraftToolBar: if not hasattr(FreeCADGui,"draftToolBar"): FreeCADGui.draftToolBar = DraftToolBar() +#----End of Python Features Definitions----# + +if not hasattr(FreeCADGui,"Snapper"): + import DraftSnap