1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -928,7 +928,10 @@ Standard_Boolean AIS_InteractiveContext::IsHilighted (const Handle(AIS_Interacti
return myObjects (theObj)->IsHilighted();
}
for (Standard_Integer aCtxIdx = HighestIndex(); aCtxIdx >= 1; aCtxIdx--)
Standard_DISABLE_DEPRECATION_WARNINGS
Standard_Integer aCtxIdx = HighestIndex();
Standard_ENABLE_DEPRECATION_WARNINGS
for (; aCtxIdx >= 1; aCtxIdx--)
{
if (myLocalContexts.IsBound (aCtxIdx))
{
@@ -2268,6 +2271,7 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
if (aStatus->IsHilighted())
{
Standard_DISABLE_DEPRECATION_WARNINGS
if (IsCurrent (theIObj))
{
AddOrRemoveCurrentObject (theIObj, Standard_False);
@@ -2276,6 +2280,7 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
{
unhighlightGlobal (theIObj, aStatus->DisplayMode());
}
Standard_ENABLE_DEPRECATION_WARNINGS
}
myMainPM->SetVisibility (theIObj, aStatus->DisplayMode(), Standard_False);
@@ -2354,6 +2359,7 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
myMainPM->Erase (theIObj, -1);
// Object removes from Detected sequence
Standard_DISABLE_DEPRECATION_WARNINGS
for (Standard_Integer aDetIter = myDetectedSeq.Lower(); aDetIter <= myDetectedSeq.Upper(); ++aDetIter)
{
Handle(AIS_InteractiveObject) anObj = DetectedCurrentObject();
@@ -2363,6 +2369,7 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
myDetectedSeq.Remove (aDetIter);
}
}
Standard_ENABLE_DEPRECATION_WARNINGS
// remove IO from the selection manager to avoid memory leaks
const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity