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

0024569: AIS_InteractiveContext::Update(...) does not updates selection when changing AIS_Plane

1) Allow AIS_InteractiveContext::Update to check, re-project and recompute selection structures even if presentations are not "to be updated".
2) Test case bugs vis bug24569.

Small correction of test case for issue CR24569
This commit is contained in:
apl
2014-01-30 13:03:48 +04:00
committed by bugmaster
parent a86d3ec04b
commit f38896916f
5 changed files with 268 additions and 40 deletions

View File

@@ -1270,42 +1270,44 @@ void AIS_InteractiveContext::RecomputeSelectionOnly(const Handle(AIS_Interactive
//function : Update
//purpose :
//=======================================================================
void AIS_InteractiveContext::Update(const Handle(AIS_InteractiveObject)& anIObj,
const Standard_Boolean updateviewer)
void AIS_InteractiveContext::Update (const Handle(AIS_InteractiveObject)& theIObj,
const Standard_Boolean theUpdateViewer)
{
if(anIObj.IsNull()) return;
TColStd_ListOfInteger LL;
anIObj->ToBeUpdated(LL);
TColStd_ListIteratorOfListOfInteger ITI(LL);
Standard_Boolean wasupdated(Standard_False);
for (;ITI.More();ITI.Next()){
anIObj->Update(ITI.Value(),Standard_False);
wasupdated = Standard_True;
if (theIObj.IsNull())
{
return;
}
if(wasupdated)
mgrSelector->Update(anIObj);
if(updateviewer){
if(!myObjects.IsBound(anIObj)) return;
switch(myObjects(anIObj)->GraphicStatus()){
case AIS_DS_Displayed:
case AIS_DS_Temporary:
myMainVwr->Update();
break;
default:
break;
TColStd_ListOfInteger aListOfFlaggedPrsModes;
theIObj->ToBeUpdated (aListOfFlaggedPrsModes);
TColStd_ListIteratorOfListOfInteger aPrsModesIt (aListOfFlaggedPrsModes);
for ( ; aPrsModesIt.More(); aPrsModesIt.Next())
{
theIObj->Update (aPrsModesIt.Value(), Standard_False);
}
mgrSelector->Update(theIObj);
if (theUpdateViewer)
{
if (!myObjects.IsBound (theIObj))
{
return;
}
switch (myObjects (theIObj)->GraphicStatus())
{
case AIS_DS_Displayed:
case AIS_DS_Temporary:
myMainVwr->Update();
break;
default:
break;
}
}
}
//=======================================================================
//function : SetLocation
//purpose :