From 2833d61c7ee9a9d8b3f212e8b06fbd5375197c0a Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 26 Sep 2014 15:07:50 +0400 Subject: [PATCH] Avoid direct link to SketchPlugin --- src/PartSet/PartSet_Listener.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/PartSet/PartSet_Listener.cpp b/src/PartSet/PartSet_Listener.cpp index 43709df50..f66ac66b4 100644 --- a/src/PartSet/PartSet_Listener.cpp +++ b/src/PartSet/PartSet_Listener.cpp @@ -17,8 +17,6 @@ #include #include -#include - #ifdef _DEBUG #include #endif @@ -60,10 +58,10 @@ void PartSet_Listener::processEvent(const boost::shared_ptr& the for (; anIt != aLast; anIt++) { ObjectPtr aObj = (*anIt); aDisplayer->deactivate(aObj); - boost::shared_ptr aSketch = - boost::dynamic_pointer_cast(aObj); - if (aSketch) // Activate sketcher for planes selection - myModule->activateFeature(aSketch, false); + boost::shared_ptr aFeature = + boost::dynamic_pointer_cast(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) { -- 2.39.2