1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0028162: Draw Harness - eliminate usage of deprecated Local Context

Create a general draw command 'VRelation' and drop the old 'relation' commands.
Add test cases for new draw command "vrelation".
Add two new methods: Activate and Deactivate which activate/deactivate the given selection mode for all displayed objects.
Eliminate deprecated local context methods in ObjectCommands, QABugs.
Eliminate deprecated local context methods in mfc standard sample and qt samples.
This commit is contained in:
isk
2016-11-28 12:11:43 +03:00
committed by apn
parent 0a8630615d
commit 404c893694
55 changed files with 1886 additions and 3290 deletions

View File

@@ -67,9 +67,9 @@ CButton* CLengthParamsEdgePage::GetButton()
void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
{
myAISContext->LocalContext()->InitSelected();
myAISContext->InitSelected();
if (!myAISContext->LocalContext()->MoreSelected() ||
if (!myAISContext->MoreSelected() ||
myAISContext->SelectedShape().ShapeType() != TopAbs_EDGE)
{
AfxMessageBox ( _T("Choose the edge and press the button again"), MB_ICONINFORMATION | MB_OK);
@@ -79,7 +79,7 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
TopoDS_Shape aSelShape = myAISContext->SelectedShape();
const TopoDS_Edge& anEdge = TopoDS::Edge (aSelShape);
myAISContext->LocalContext()->ClearSelected();
myAISContext->ClearSelected();
TopoDS_Vertex aFirstVertex, aSecondVertex;
TopExp::Vertices (TopoDS::Edge (anEdge), aFirstVertex, aSecondVertex);
@@ -108,8 +108,6 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
aLenDim->SetDimensionAspect (anAspect);
aLenDim->SetFlyout (aDimDlg->GetFlyout());
myAISContext->CloseAllContexts();
myAISContext->Display (aLenDim);
myAISContext->OpenLocalContext();
myAISContext->ActivateStandardMode(TopAbs_EDGE);
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
}