0031456: Visualization - move out Dimensions and Relations from package AIS to PrsDims
[occt.git] / samples / mfc / standard / Common / LengthParamsEdgePage.cpp
index 5bc78bd..89c90ce 100644 (file)
@@ -7,8 +7,7 @@
 
 #include <Standard_Macro.hxx>
 #include <AIS_InteractiveContext.hxx>
-#include <AIS_LocalContext.hxx>
-#include <AIS_LengthDimension.hxx>
+#include <PrsDim_LengthDimension.hxx>
 #include <GC_MakePlane.hxx>
 #include <TopExp.hxx>
 
@@ -79,7 +78,7 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
   TopoDS_Shape aSelShape = myAISContext->SelectedShape();
   const TopoDS_Edge& anEdge = TopoDS::Edge (aSelShape);
 
-  myAISContext->ClearSelected();
+  myAISContext->ClearSelected (Standard_False);
   TopoDS_Vertex aFirstVertex, aSecondVertex;
   TopExp::Vertices (TopoDS::Edge (anEdge), aFirstVertex, aSecondVertex);
 
@@ -92,7 +91,7 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
 
   CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
 
-  Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (TopoDS::Edge (anEdge), aPlane->Pln());
+  Handle(PrsDim_LengthDimension) aLenDim = new PrsDim_LengthDimension (TopoDS::Edge (anEdge), aPlane->Pln());
   Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
   anAspect->MakeArrows3d (Standard_False);
   anAspect->MakeText3d (aDimDlg->GetTextType());
@@ -108,6 +107,6 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
   aLenDim->SetDimensionAspect (anAspect);
   aLenDim->SetFlyout (aDimDlg->GetFlyout());
 
-  myAISContext->Display (aLenDim);
+  myAISContext->Display (aLenDim, Standard_True);
   myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
 }