]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Corrected by vsv for bug PAL13610.
authorskl <skl@opencascade.com>
Wed, 25 Oct 2006 13:04:41 +0000 (13:04 +0000)
committerskl <skl@opencascade.com>
Wed, 25 Oct 2006 13:04:41 +0000 (13:04 +0000)
src/GEOMGUI/GeometryGUI_Swig.cxx

index 3b7601fa13136207535d26836fd46013b6b2b292..22159ad46a71486fdb881ee153f4fd139c7059fb 100644 (file)
@@ -66,6 +66,7 @@
 #include <AIS_ListOfInteractive.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <AIS_Drawer.hxx>
+#include <BRepTools.hxx>
 
 // IDL Headers
 #include <SALOMEconfig.h>
@@ -613,13 +614,13 @@ void GEOM_Swig::setDeflection(const char* theEntry, float theDeflect)
          if ((!aObj.IsNull()) && aObj->hasEntry() && aObj->isSame(anIO)) {
            Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(it.Value());
            if (!aShape.IsNull()) {
-             Handle(AIS_Drawer) aDrawer = aShape->Attributes();
-             if (aDrawer.IsNull())
-               aDrawer = new AIS_Drawer();
-             aDrawer->SetDeviationCoefficient(myParam);
-             aShape->SetAttributes(aDrawer);
-             aContext->Redisplay(aShape, true, true);
-             aContext->UpdateCurrentViewer();
+             TopoDS_Shape aSh = aShape->Shape();
+             if (!aSh.IsNull())
+               BRepTools::Clean(aSh);
+
+             aShape->SetOwnDeviationCoefficient( myParam );
+             aShape->SetOwnHLRDeviationAngle( 1.57 );
+             aContext->Redisplay(aShape);
              return;
            }
          }