From: nds Date: Mon, 9 Oct 2017 08:11:14 +0000 (+0300) Subject: Issue #2271 'Fatal error' during sketching : avoid error by the file loading X-Git-Tag: V_2.9.0~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4a28e8c0e2db101aece2218c84de34f98fa21fe7;p=modules%2Fshaper.git Issue #2271 'Fatal error' during sketching : avoid error by the file loading --- diff --git a/src/SketchAPI/SketchAPI_Projection.cpp b/src/SketchAPI/SketchAPI_Projection.cpp index 38e84be98..6d82651e9 100644 --- a/src/SketchAPI/SketchAPI_Projection.cpp +++ b/src/SketchAPI/SketchAPI_Projection.cpp @@ -22,10 +22,12 @@ #include #include +#include #include #include #include +#include #include #include @@ -95,11 +97,14 @@ std::shared_ptr SketchAPI_Projection::createdFeature() c return anEntity; } - aProjectedFeature->getKind() == SketchPlugin_Line::ID() ? - anEntity.reset(new SketchAPI_Line(aProjectedFeature)) : - aProjectedFeature->getKind() == SketchPlugin_Circle::ID() ? - anEntity.reset(new SketchAPI_Circle(aProjectedFeature)) : - anEntity.reset(new SketchAPI_Arc(aProjectedFeature)); + if (aProjectedFeature->getKind() == SketchPlugin_Line::ID()) + anEntity.reset(new SketchAPI_Line(aProjectedFeature)); + else if (aProjectedFeature->getKind() == SketchPlugin_Circle::ID()) + anEntity.reset(new SketchAPI_Circle(aProjectedFeature)); + else if (aProjectedFeature->getKind() == SketchPlugin_Arc::ID()) + anEntity.reset(new SketchAPI_Arc(aProjectedFeature)); + else if (aProjectedFeature->getKind() == SketchPlugin_Point::ID()) + anEntity.reset(new SketchAPI_Point(aProjectedFeature)); return anEntity; }