0029739: Draw Harness - vdonly does not hide displayed objects
authornds <nds@opencascade.com>
Mon, 7 May 2018 11:20:38 +0000 (14:20 +0300)
committerabv <abv@opencascade.com>
Wed, 23 May 2018 03:57:17 +0000 (06:57 +0300)
src/ViewerTest/ViewerTest.cxx
tests/v3d/wire_solid/L1 [new file with mode: 0644]

index e81f4cf..6f53cd3 100644 (file)
@@ -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 (file)
index 0000000..beeb052
--- /dev/null
@@ -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"}