]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Avoid direct link to SketchPlugin
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 26 Sep 2014 11:07:50 +0000 (15:07 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 26 Sep 2014 11:07:50 +0000 (15:07 +0400)
src/PartSet/PartSet_Listener.cpp

index 43709df50c354fb6150680e67b6f9f8cab3cff5f..f66ac66b4d4c9b85bf70c37870dbe73d5b2ecc92 100644 (file)
@@ -17,8 +17,6 @@
 #include <Events_Loop.h>
 #include <ModelAPI_Events.h>
 
-#include <SketchPlugin_Sketch.h>
-
 #ifdef _DEBUG
 #include <QDebug>
 #endif
@@ -60,10 +58,10 @@ void PartSet_Listener::processEvent(const boost::shared_ptr<Events_Message>& the
     for (; anIt != aLast; anIt++) {
       ObjectPtr aObj = (*anIt);
       aDisplayer->deactivate(aObj);
-      boost::shared_ptr<SketchPlugin_Sketch> aSketch = 
-        boost::dynamic_pointer_cast<SketchPlugin_Sketch>(aObj);
-      if (aSketch) // Activate sketcher for planes selection
-        myModule->activateFeature(aSketch, false);
+      boost::shared_ptr<ModelAPI_Feature> aFeature = 
+        boost::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
+      if (aFeature && (aFeature->getKind() == "Sketch")) // Activate sketcher for planes selection
+        myModule->activateFeature(aFeature, false);
       // If current operation is Sketch then there is no active sketching operation
       // and possible the object was created by Redo operatgion
       else if (aSketchOp) {