From 29659910b0ea11d82a691db29953c47b68137efc Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 26 Feb 2016 09:06:53 +0300 Subject: [PATCH] #1340 Filter for edges outside sketch plane --- src/PartSet/PartSet_WidgetShapeSelector.cpp | 3 ++- src/SketchPlugin/SketchPlugin_IntersectionPoint.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_WidgetShapeSelector.cpp b/src/PartSet/PartSet_WidgetShapeSelector.cpp index 8bc3368bd..305337337 100755 --- a/src/PartSet/PartSet_WidgetShapeSelector.cpp +++ b/src/PartSet/PartSet_WidgetShapeSelector.cpp @@ -48,7 +48,8 @@ void PartSet_WidgetShapeSelector::activateSelectionAndFilters(bool toActivate) if (!myUseSketchPlane) { XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop); PartSet_Module* aModule = dynamic_cast(aWorkshop->module()); - aModule->sketchMgr()->activatePlaneFilter(false); + bool isUsePlaneFilterOnly = !toActivate; + aModule->sketchMgr()->activatePlaneFilter(isUsePlaneFilterOnly); } } diff --git a/src/SketchPlugin/SketchPlugin_IntersectionPoint.cpp b/src/SketchPlugin/SketchPlugin_IntersectionPoint.cpp index 23b4d018d..3643b3ca7 100644 --- a/src/SketchPlugin/SketchPlugin_IntersectionPoint.cpp +++ b/src/SketchPlugin/SketchPlugin_IntersectionPoint.cpp @@ -7,6 +7,8 @@ #include "SketchPlugin_IntersectionPoint.h" #include +#include +#include #include #include @@ -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(); } -- 2.39.2