From: vsv Date: Wed, 29 Oct 2014 08:42:31 +0000 (+0300) Subject: Provide selection of dimensions without using of non-sketcher objects X-Git-Tag: V_0.5~66^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0309cb8148f93cd9fe83b73af5dec9e36deb97e0;p=modules%2Fshaper.git Provide selection of dimensions without using of non-sketcher objects --- diff --git a/src/ModuleBase/ModuleBase_Operation.h b/src/ModuleBase/ModuleBase_Operation.h index 80f18f35b..9d1a1c04a 100644 --- a/src/ModuleBase/ModuleBase_Operation.h +++ b/src/ModuleBase/ModuleBase_Operation.h @@ -17,7 +17,6 @@ #include #include #include -#include class ModuleBase_ModelWidget; class ModuleBase_OperationDescription; diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.cpp b/src/ModuleBase/ModuleBase_ViewerFilters.cpp index 4b6e571df..b10437101 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.cpp +++ b/src/ModuleBase/ModuleBase_ViewerFilters.cpp @@ -74,8 +74,10 @@ Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk(const Handle(SelectMgr_Enti return aD1 && aD2 && aD3; } } + } else { + // This is not object controlled by the filter + return Standard_True; } } - // This is not object controlled by the filter - return Standard_True; + return Standard_False; } diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 658dbff6c..f38381ef8 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -366,13 +366,14 @@ void PartSet_Module::setSketchingMode(const gp_Pln& thePln) // Clear standard selection modes aDisplayer->setSelectionModes(aModes); aDisplayer->openLocalContext(); - // Get default selection modes - aModes = sketchSelectionModes(ObjectPtr()); - aDisplayer->activateObjectsOutOfContext(aModes); // Set filter mySketchFilter = new ModuleBase_ShapeInPlaneFilter(thePln); aDisplayer->addSelectionFilter(mySketchFilter); + + // Get default selection modes + aModes = sketchSelectionModes(ObjectPtr()); + aDisplayer->activateObjectsOutOfContext(aModes); } void PartSet_Module::onFeatureConstructed(ObjectPtr theFeature, int theMode)