From b4dfd4364899c3c53cf809d54a4ef4ac0a03a2ea Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 7 May 2018 14:20:38 +0300 Subject: [PATCH] 0029739: Draw Harness - vdonly does not hide displayed objects --- src/ViewerTest/ViewerTest.cxx | 2 +- tests/v3d/wire_solid/L1 | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/v3d/wire_solid/L1 diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index e81f4cfe99..6f53cd3ada 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -2956,7 +2956,7 @@ static int VDonly2 (Draw_Interpretor& , } const Handle(AIS_InteractiveObject) aShape = Handle(AIS_InteractiveObject)::DownCast (anIter.Key1()); - if (aShape.IsNull()) + if (!aShape.IsNull()) { aCtx->Erase (aShape, Standard_False); } diff --git a/tests/v3d/wire_solid/L1 b/tests/v3d/wire_solid/L1 new file mode 100644 index 0000000000..beeb052aa7 --- /dev/null +++ b/tests/v3d/wire_solid/L1 @@ -0,0 +1,13 @@ +puts "========" +puts "0029739: Draw Harness - vdonly does not hide displayed objects" +puts "========" + +box b1 0 0 0 1 2 3 +box b2 2 0 0 3 2 1 +vclear +vaxo +vdisplay -dispMode 1 b1 b2 +vfit +vdonly b1 +if {[vreadpixel 100 100 rgb name] == "BLACK"} {puts "Error: wrong prs erased"} +if {[vreadpixel 300 300 rgb name] != "BLACK"} {puts "Error: wrong prs erased"}