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

@@ -58,8 +58,8 @@ END_MESSAGE_MAP()
void CRadiusParamsPage::OnBnClickedObjectBtn()
{
//Build dimension here
myAISContext->LocalContext()->InitSelected();
if (!myAISContext->LocalContext()->MoreSelected() ||
myAISContext->InitSelected();
if (!myAISContext->MoreSelected() ||
myAISContext->SelectedShape().ShapeType() != TopAbs_EDGE)
{
AfxMessageBox (_T ("Choose the edge and press the button again"), MB_ICONINFORMATION | MB_OK);
@@ -94,7 +94,7 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
}
}
myAISContext->LocalContext()->ClearSelected();
myAISContext->ClearSelected();
CDimensionDlg *aDimDlg = (CDimensionDlg*)(this->GetParentOwner());
// Try to create dimension if it is possible
Handle(AIS_Dimension) aDim;
@@ -124,10 +124,7 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
aDim->SetDimensionAspect (anAspect);
// Display dimension in the neutral point
myAISContext->CloseAllContexts();
myAISContext->Display (aDim);
myAISContext->OpenLocalContext();
myAISContext->ActivateStandardMode (TopAbs_EDGE);
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
}