mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0026726: Draw Harness, ViewerTest - AIS_InteractiveContext::EraseSelected() lacks test case
Update draw command ViewerTest::Erase().
This commit is contained in:
parent
6cc6fc047c
commit
671b6fe0cc
@ -2776,6 +2776,7 @@ int VErase (Draw_Interpretor& theDI,
|
|||||||
else if (!toEraseAll && aCtx->NbSelected() > 0)
|
else if (!toEraseAll && aCtx->NbSelected() > 0)
|
||||||
{
|
{
|
||||||
// Erase selected objects
|
// Erase selected objects
|
||||||
|
const Standard_Boolean aHasOpenedContext = aCtx->HasOpenedContext();
|
||||||
for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS());
|
for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS());
|
||||||
anIter.More(); anIter.Next())
|
anIter.More(); anIter.Next())
|
||||||
{
|
{
|
||||||
@ -2788,12 +2789,17 @@ int VErase (Draw_Interpretor& theDI,
|
|||||||
{
|
{
|
||||||
aCtx->SetViewAffinity (anIO, aView, Standard_False);
|
aCtx->SetViewAffinity (anIO, aView, Standard_False);
|
||||||
}
|
}
|
||||||
else
|
else if (aHasOpenedContext)
|
||||||
{
|
{
|
||||||
aCtx->Erase (anIO, Standard_False);
|
aCtx->Erase (anIO, Standard_False);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!toEraseInView)
|
||||||
|
{
|
||||||
|
aCtx->EraseSelected (Standard_False);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
36
tests/bugs/vis/bug26726
Normal file
36
tests/bugs/vis/bug26726
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC26726 erase selected objects"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
pload VISUALIZATION
|
||||||
|
|
||||||
|
|
||||||
|
vclear
|
||||||
|
vclose all
|
||||||
|
vinit
|
||||||
|
vsetdispmode 1
|
||||||
|
|
||||||
|
box b0 5 0 0 1 1 1
|
||||||
|
box b1 0 5 0 1 1 1
|
||||||
|
box b2 0 0 5 1 1 1
|
||||||
|
box b3 5 5 5 1 1 1
|
||||||
|
|
||||||
|
vdisplay b0 b1 b2 b3
|
||||||
|
|
||||||
|
vdump $imagedir/${casename}_0.png
|
||||||
|
|
||||||
|
vfit
|
||||||
|
|
||||||
|
vselect 0 0 500 500
|
||||||
|
verase
|
||||||
|
|
||||||
|
vdump $imagedir/${casename}_1.png
|
||||||
|
|
||||||
|
set info_b0 [vreadpixel 205 355 name]
|
||||||
|
set info_b1 [vreadpixel 205 190 name]
|
||||||
|
set info_b2 [vreadpixel 60 100 name]
|
||||||
|
set info_b3 [vreadpixel 350 100 name]
|
||||||
|
|
||||||
|
if { $info_b0 != "BLACK 0" || $info_b1 != "BLACK 0" || $info_b2 != "BLACK 0" || $info_b3 != "BLACK 0" } {
|
||||||
|
puts "Error: OCC26726 is reproduced. AIS_InteractiveContext::EraseSelected is incorrect."
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user