]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1343. Improvement of Extrusion and Revolution operations: correction for case...
authornds <nds@opencascade.com>
Thu, 7 Apr 2016 10:42:38 +0000 (13:42 +0300)
committernds <nds@opencascade.com>
Thu, 7 Apr 2016 10:42:38 +0000 (13:42 +0300)
src/PartSet/PartSet_WidgetSketchCreator.cpp

index ba9f9f124ee448081ff3794d84bc114669215bd9..131106e74a6b9c1c51c4a339cd83117a6b6f6b35 100644 (file)
@@ -303,7 +303,13 @@ bool PartSet_WidgetSketchCreator::startSketchOperation(const QList<ModuleBase_Vi
     return aSketchStarted;
 
   ModuleBase_ViewerPrsPtr aValue = theValues.front();
-  if (!PartSet_WidgetSketchLabel::canFillSketch(aValue))
+  if (!aValue.get() || !PartSet_WidgetSketchLabel::canFillSketch(aValue))
+    return aSketchStarted;
+
+  ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aValue->object());
+  /// sketch should not started by object(face) selected as global. If Local face is selected,
+  /// sketch is started
+  if (aResult.get() && aValue->shape().get() && aResult->shape()->isEqual(aValue->shape()))
     return aSketchStarted;
 
   aSketchStarted = true;