mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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:
parent
8022338566
commit
ef9a9362ae
@ -108,7 +108,18 @@ bool OpenGl_Layer::Remove (const OpenGl_Structure* theStruct,
|
|||||||
|
|
||||||
if (!isForChangePriority)
|
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);
|
const Standard_Integer anIndex2 = myAlwaysRenderedMap.FindIndex (theStruct);
|
||||||
if (anIndex2 != 0)
|
if (anIndex2 != 0)
|
||||||
@ -117,13 +128,6 @@ bool OpenGl_Layer::Remove (const OpenGl_Structure* theStruct,
|
|||||||
myAlwaysRenderedMap.RemoveLast();
|
myAlwaysRenderedMap.RemoveLast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!myBVHPrimitives.Remove (theStruct))
|
|
||||||
{
|
|
||||||
myBVHPrimitivesTrsfPers.Remove (theStruct);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
--myNbStructures;
|
--myNbStructures;
|
||||||
thePriority = aPriorityIter;
|
thePriority = aPriorityIter;
|
||||||
|
18
tests/bugs/vis/bug28093
Normal file
18
tests/bugs/vis/bug28093
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
puts "==========="
|
||||||
|
puts "OCC28093"
|
||||||
|
puts "Visualization - access violation on removal of dynamic highlighting after device loss"
|
||||||
|
puts "==========="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload MODELING VISUALIZATION
|
||||||
|
box b 1 2 3
|
||||||
|
vclear
|
||||||
|
vinit View1
|
||||||
|
vdisplay -dispMode 1 -highMode 1 b
|
||||||
|
vfit
|
||||||
|
|
||||||
|
vmoveto 250 250
|
||||||
|
vraytrace 1
|
||||||
|
vmoveto 400 400
|
||||||
|
|
||||||
|
vdump $imagedir/${casename}.png
|
Loading…
x
Reference in New Issue
Block a user