From 483131e6288bd7071f4cc0249336b38634ebc74b Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 1 Mar 2012 20:29:33 +0100 Subject: [PATCH] Fix typos, fix wronng paths to resources --- src/App/PropertyStandard.cpp | 2 +- src/App/PropertyStandard.h | 2 +- src/Mod/Part/App/ImportStep.cpp | 8 +++++--- src/Mod/Start/StartPage/LoadDrawingExample.py | 2 +- src/Mod/Start/StartPage/LoadPartDesignExample.py | 2 +- src/Mod/Start/StartPage/LoadRobotExample.py | 2 +- src/Mod/Start/StartPage/LoadSchenkel.py | 2 +- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index 76a066630..59a407f70 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -1756,7 +1756,7 @@ void PropertyMaterial::setSpecularColor(const Color& col) hasSetValue(); } -void PropertyMaterial::setEmmisiveColor(const Color& col) +void PropertyMaterial::setEmissiveColor(const Color& col) { aboutToSetValue(); _cMat.emissiveColor = col; diff --git a/src/App/PropertyStandard.h b/src/App/PropertyStandard.h index 074d12de3..bff973cb2 100644 --- a/src/App/PropertyStandard.h +++ b/src/App/PropertyStandard.h @@ -723,7 +723,7 @@ public: void setAmbientColor(const Color& col); void setDiffuseColor(const Color& col); void setSpecularColor(const Color& col); - void setEmmisiveColor(const Color& col); + void setEmissiveColor(const Color& col); void setShininess(float); void setTransparency(float); diff --git a/src/Mod/Part/App/ImportStep.cpp b/src/Mod/Part/App/ImportStep.cpp index 47de6ff4f..fa05530d6 100644 --- a/src/Mod/Part/App/ImportStep.cpp +++ b/src/Mod/Part/App/ImportStep.cpp @@ -35,6 +35,7 @@ # include # include # include +# include #endif #include @@ -89,9 +90,10 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name) TopoDS_Shape aShape; Base::FileInfo fi(Name); - if (!fi.isReadable()) { - Base::Console().Log("ImportStep() not able to open %s!\n",Name); - throw Base::Exception("Cannot open STEP file"); + if (!fi.exists()) { + std::stringstream str; + str << "File '" << Name << "' does not exist!"; + throw Base::Exception(str.str().c_str()); } if (aReader.ReadFile((Standard_CString)Name) != IFSelect_RetDone) { diff --git a/src/Mod/Start/StartPage/LoadDrawingExample.py b/src/Mod/Start/StartPage/LoadDrawingExample.py index 9a8da5b6d..654a71f82 100644 --- a/src/Mod/Start/StartPage/LoadDrawingExample.py +++ b/src/Mod/Start/StartPage/LoadDrawingExample.py @@ -1,5 +1,5 @@ import FreeCAD,FreeCADGui FreeCADGui.activateWorkbench("DrawingWorkbench") -FreeCAD.open(FreeCAD.getResourceDir()+"data/examples/DrawingExample.FCStd") +FreeCAD.open(FreeCAD.getResourceDir()+"examples/DrawingExample.FCStd") FreeCADGui.SendMsgToActiveView("ViewFit") FreeCADGui.activeDocument().activeView().viewAxometric() diff --git a/src/Mod/Start/StartPage/LoadPartDesignExample.py b/src/Mod/Start/StartPage/LoadPartDesignExample.py index a97751a6b..9d90f4969 100644 --- a/src/Mod/Start/StartPage/LoadPartDesignExample.py +++ b/src/Mod/Start/StartPage/LoadPartDesignExample.py @@ -1,4 +1,4 @@ import FreeCAD,FreeCADGui -FreeCAD.open(FreeCAD.getResourceDir()+"data/examples/PartDesignExample.FCStd") +FreeCAD.open(FreeCAD.getResourceDir()+"examples/PartDesignExample.FCStd") FreeCADGui.SendMsgToActiveView("ViewFit") FreeCADGui.activeDocument().activeView().viewAxometric() diff --git a/src/Mod/Start/StartPage/LoadRobotExample.py b/src/Mod/Start/StartPage/LoadRobotExample.py index e667309d1..229552b78 100644 --- a/src/Mod/Start/StartPage/LoadRobotExample.py +++ b/src/Mod/Start/StartPage/LoadRobotExample.py @@ -1,4 +1,4 @@ import FreeCAD,FreeCADGui -FreeCAD.open(FreeCAD.getResourceDir()+"data/examples/RobotExample.FCStd") +FreeCAD.open(FreeCAD.getResourceDir()+"examples/RobotExample.FCStd") FreeCADGui.SendMsgToActiveView("ViewFit") FreeCADGui.activeDocument().activeView().viewAxometric() diff --git a/src/Mod/Start/StartPage/LoadSchenkel.py b/src/Mod/Start/StartPage/LoadSchenkel.py index d24ae936f..84aa61276 100644 --- a/src/Mod/Start/StartPage/LoadSchenkel.py +++ b/src/Mod/Start/StartPage/LoadSchenkel.py @@ -1,4 +1,4 @@ import FreeCAD,FreeCADGui,Part -Part.open(FreeCAD.getResourceDir()+"data/examples/Schenkel.stp") +Part.open(FreeCAD.getResourceDir()+"examples/Schenkel.stp") FreeCADGui.SendMsgToActiveView("ViewFit") Gui.activeDocument().activeView().viewAxometric()