mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0028093: Visualization - access violation on removal of dynamic highlighting after device loss
OpenGl_Layer::Remove() now tries to remove object from myAlwaysRenderedMap if it was not removed from other groups.
This commit is contained in:
@@ -108,7 +108,18 @@ bool OpenGl_Layer::Remove (const OpenGl_Structure* theStruct,
|
||||
|
||||
if (!isForChangePriority)
|
||||
{
|
||||
if (theStruct->IsAlwaysRendered())
|
||||
Standard_Boolean isAlwaysRend = theStruct->IsAlwaysRendered();
|
||||
if (!isAlwaysRend)
|
||||
{
|
||||
if (!myBVHPrimitives.Remove (theStruct))
|
||||
{
|
||||
if (!myBVHPrimitivesTrsfPers.Remove (theStruct))
|
||||
{
|
||||
isAlwaysRend = Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAlwaysRend)
|
||||
{
|
||||
const Standard_Integer anIndex2 = myAlwaysRenderedMap.FindIndex (theStruct);
|
||||
if (anIndex2 != 0)
|
||||
@@ -117,13 +128,6 @@ bool OpenGl_Layer::Remove (const OpenGl_Structure* theStruct,
|
||||
myAlwaysRenderedMap.RemoveLast();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!myBVHPrimitives.Remove (theStruct))
|
||||
{
|
||||
myBVHPrimitivesTrsfPers.Remove (theStruct);
|
||||
}
|
||||
}
|
||||
}
|
||||
--myNbStructures;
|
||||
thePriority = aPriorityIter;
|
||||
|
Reference in New Issue
Block a user