1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0025629: Visualization, AIS_InteractiveContext - code clean up

Drop confusing method AIS_InteractiveContext::Clear() which is the same as ::Remove().
AIS_InteractiveContext::Display() - fix double viewer update on first display of presentation.
AIS_InteractiveContext::DisplayedObjects() - fix objects retrieval from local contexts.
AIS_InteractiveContext::Load() - do not bind object twice.

Drop code blocks for debug output.
Code clean up.
This commit is contained in:
kgv 2014-12-24 12:15:53 +03:00 committed by bugmaster
parent 270675f51e
commit 2195ab9699
4 changed files with 1734 additions and 1828 deletions

View File

@ -268,15 +268,6 @@ is
-- inWhichLocal gives the local context in which anIObj
-- is displayed. By default, the index -1 refers to the last
-- Local Context opened.
Clear(me : mutable;
aniobj : InteractiveObject from AIS;
updateviewer : Boolean from Standard = Standard_True);
---Purpose: Removes the interactive object aniobj from all viewers.
-- If a local context is open and if updateviewer equals
-- Standard_False, the presentation of the Interactive
-- Object activates the selection mode; the object is
-- displayed but no viewer will be updated.
ClearPrs( me :mutable;
aniobj : InteractiveObject from AIS;
@ -2046,6 +2037,16 @@ is
PurgeViewer(me:mutable;Vwr:Viewer from V3d)
returns Integer from Standard is static private;
redisplayPrsModes (me : mutable;
theIObj : InteractiveObject from AIS;
theToUpdateViewer : Boolean from Standard = Standard_True) is static private;
---Purpose: UNKNOWN
redisplayPrsRecModes (me : mutable;
theIObj : InteractiveObject from AIS;
theToUpdateViewer : Boolean from Standard = Standard_True) is static private;
---Purpose: UNKNOWN
fields
myObjects : DataMapOfIOStatus from AIS;

File diff suppressed because it is too large Load Diff

View File

@ -236,10 +236,10 @@ static Standard_Integer OCC136 (Draw_Interpretor& di, Standard_Integer argc, con
anAISCtx->AddOrRemoveCurrentObject(aSh4);
//remove all this objects from context
anAISCtx->Clear(aSh1, Standard_False);
anAISCtx->Clear(aSh2, Standard_False);
anAISCtx->Clear(aSh3, Standard_False);
anAISCtx->Clear(aSh4, Standard_False);
anAISCtx->Remove (aSh1, Standard_False);
anAISCtx->Remove (aSh2, Standard_False);
anAISCtx->Remove (aSh3, Standard_False);
anAISCtx->Remove (aSh4, Standard_False);
return 0;
}

View File

@ -241,7 +241,7 @@ Standard_EXPORT Standard_Boolean VDisplayAISObject (const TCollection_AsciiStrin
Handle(AIS_InteractiveObject)::DownCast (aMap.Find2 (theName));
if (!anOldObj.IsNull())
aContextAIS->Clear (anOldObj, Standard_True);
aContextAIS->Remove (anOldObj, Standard_True);
// remove name and old object from map
aMap.UnBind2 (theName);
@ -2751,7 +2751,7 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb,
}
else
{
anAISContext->Clear (anIO, Standard_False);
anAISContext->Remove (anIO, Standard_False);
aTexturedIO = new AIS_TexturedShape (DBRep::Get (theArgv[1]));
GetMapOfAIS().UnBind1 (anIO);
GetMapOfAIS().UnBind2 (aShapeName);