]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#1340 Filter for edges outside sketch plane
authornds <nds@opencascade.com>
Fri, 26 Feb 2016 06:06:53 +0000 (09:06 +0300)
committernds <nds@opencascade.com>
Fri, 26 Feb 2016 06:06:53 +0000 (09:06 +0300)
src/PartSet/PartSet_WidgetShapeSelector.cpp
src/SketchPlugin/SketchPlugin_IntersectionPoint.cpp

index 8bc3368bd8d86a9ff545420f8a69a1d7ed5d3c4e..305337337408e02ea7933f51fe8d5b9f6b886580 100755 (executable)
@@ -48,7 +48,8 @@ void PartSet_WidgetShapeSelector::activateSelectionAndFilters(bool toActivate)
   if (!myUseSketchPlane) {
     XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
     PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(aWorkshop->module());
-    aModule->sketchMgr()->activatePlaneFilter(false);
+    bool isUsePlaneFilterOnly = !toActivate;
+    aModule->sketchMgr()->activatePlaneFilter(isUsePlaneFilterOnly);
   }
 }
 
index 23b4d018dafc3836f0fe328a0a19cce00ea59d5e..3643b3ca73c4c79b6b75bef0ea868c8436a1d799 100644 (file)
@@ -7,6 +7,8 @@
 #include "SketchPlugin_IntersectionPoint.h"
 
 #include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Lin.h>
@@ -20,6 +22,7 @@ SketchPlugin_IntersectionPoint::SketchPlugin_IntersectionPoint()
 void SketchPlugin_IntersectionPoint::initDerivedClassAttributes()
 {
   data()->addAttribute(EXTERNAL_LINE_ID(), ModelAPI_AttributeSelection::typeId());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), AUXILIARY_ID());
 
   SketchPlugin_Point::initDerivedClassAttributes();
 }