From d59904fd37fc63567a56ad9be5401ec45b45d15d Mon Sep 17 00:00:00 2001 From: jriegel Date: Sat, 8 Nov 2014 20:29:38 +0100 Subject: [PATCH] some fixes --- src/App/GeoFeatureGroup.cpp | 4 ++-- src/App/Part.cpp | 2 +- src/Mod/Assembly/App/AppAssemblyPy.cpp | 4 ++-- src/Mod/PartDesign/InitGui.py | 5 +++++ src/Mod/PartDesign/InitGui.py.orig | 24 +++++++++++------------- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/App/GeoFeatureGroup.cpp b/src/App/GeoFeatureGroup.cpp index eb871acce..6fdd4319b 100644 --- a/src/App/GeoFeatureGroup.cpp +++ b/src/App/GeoFeatureGroup.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Jürgen Riegel (juergen.riegel@web.de) 2014 * + * Copyright (c) Juergen Riegel (juergen.riegel@web.de) 2014 * * * * This file is part of the FreeCAD CAx development system. * * * @@ -31,7 +31,7 @@ #include "GeoFeatureGroupPy.h" #include "FeaturePythonPyImp.h" -// #define new DEBUG_CLIENTBLOCK + using namespace App; diff --git a/src/App/Part.cpp b/src/App/Part.cpp index 3287849b9..def6bdd09 100644 --- a/src/App/Part.cpp +++ b/src/App/Part.cpp @@ -32,7 +32,7 @@ #include "Part.h" #include "PartPy.h" -//#define new DEBUG_CLIENTBLOCK + using namespace App; diff --git a/src/Mod/Assembly/App/AppAssemblyPy.cpp b/src/Mod/Assembly/App/AppAssemblyPy.cpp index 878e7a353..fae9f9ce9 100644 --- a/src/Mod/Assembly/App/AppAssemblyPy.cpp +++ b/src/Mod/Assembly/App/AppAssemblyPy.cpp @@ -115,8 +115,8 @@ struct PyMethodDef Assembly_methods[] = { {"setActiveBody" ,setActiveBody ,METH_VARARGS, "setActiveBody(BodyObject) -- Set the PartBody object in work."}, - {"setActiveBody" ,getActiveBody ,METH_NOARGS, - "setActiveBody() -- Get the PartBody object in work."}, + {"getActiveBody" ,getActiveBody ,METH_NOARGS, + "getActiveBody() -- Get the PartBody object in work."}, {"setUpPart" ,setUpPart ,METH_VARARGS, "setUpPart(Part) -- Sets a empty part object up for usage in PartDesign."}, diff --git a/src/Mod/PartDesign/InitGui.py b/src/Mod/PartDesign/InitGui.py index af547bedd..8185fc7b6 100644 --- a/src/Mod/PartDesign/InitGui.py +++ b/src/Mod/PartDesign/InitGui.py @@ -52,6 +52,11 @@ class PartDesignWorkbench ( Workbench ): import InvoluteGearFeature except ImportError: print "Involute gear module cannot be loaded" + try: + from FeatureHole import HoleGui + except: + pass + def GetClassName(self): return "PartDesignGui::Workbench" diff --git a/src/Mod/PartDesign/InitGui.py.orig b/src/Mod/PartDesign/InitGui.py.orig index dc1f3b285..000525634 100644 --- a/src/Mod/PartDesign/InitGui.py.orig +++ b/src/Mod/PartDesign/InitGui.py.orig @@ -36,14 +36,17 @@ class PartDesignWorkbench ( Workbench ): self.__class__.MenuText = "Part Design" self.__class__.ToolTip = "Part Design workbench" -<<<<<<< ae478b98ed61389183af93a610e1a07448918eb5 def Initialize(self): # load the module try: from WizardShaft import WizardShaft except ImportError: print "Wizard shaft module cannot be loaded" - from FeatureHole import HoleGui + try: + from FeatureHole import HoleGui + except: + pass +<<<<<<< 1cdecc120fcdcd3447f72fdd734cf6c4f78b056b import PartDesignGui import PartDesign try: @@ -53,24 +56,19 @@ class PartDesignWorkbench ( Workbench ): def GetClassName(self): return "PartDesignGui::Workbench" ======= - def Initialize(self): - # load the module - try: - from WizardShaft import WizardShaft - except ImportError: - print "Wizard shaft module cannot be loaded" - try: - from FeatureHole import HoleGui - except: - pass import PartDesignGui import PartDesign try: import InvoluteGearFeature except ImportError: print "Involute gear module cannot be loaded" + try: + from FeatureHole import HoleGui + except: + pass + def GetClassName(self): return "PartDesignGui::Workbench" ->>>>>>> Error handling if NumPy is not there +>>>>>>> some fixes Gui.addWorkbench(PartDesignWorkbench())