From: nds Date: Fri, 7 Apr 2017 09:12:11 +0000 (+0300) Subject: Origin selection as Rotation center of Sketch Rotation feature. X-Git-Tag: V_2.7.0~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e254fffb01b297825c0432d2d913a381d03e7cf4;p=modules%2Fshaper.git Origin selection as Rotation center of Sketch Rotation feature. --- diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.cpp b/src/ModuleBase/ModuleBase_ViewerFilters.cpp index 03d24a469..31a8e9be3 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.cpp +++ b/src/ModuleBase/ModuleBase_ViewerFilters.cpp @@ -87,7 +87,10 @@ Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk( if (myPlane.get()) { aValid = Standard_False; - if (theOwner->HasSelectable()) { + // selectable may be empty if the object is selected in Object Browser and is not visualized + // in the viewer(virtual owner is created for this case) + //if (theOwner->HasSelectable()) + { gp_Pln aPlane = myPlane->impl(); Handle(StdSelect_BRepOwner) aShapeOwner = Handle(StdSelect_BRepOwner)::DownCast(theOwner); if (!aShapeOwner.IsNull() && aShapeOwner->HasShape()) { @@ -112,6 +115,7 @@ Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk( break; } } else { + if (theOwner->HasSelectable()) { // Check Trihedron sub-objects Handle(SelectMgr_SelectableObject) aSelObj = theOwner->Selectable(); Handle(Standard_Type) aType = aSelObj->DynamicType(); @@ -156,6 +160,7 @@ Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk( #endif // This is not object controlled by the filter aValid = Standard_True; + } } } }