From bc5181f61508742f485c663fd9f81c70f0ea19b0 Mon Sep 17 00:00:00 2001 From: vpa Date: Fri, 25 Sep 2015 19:27:17 +0300 Subject: [PATCH] 0026721: Visualization - selection highlight of selected face is broken - fixed highlight state in global status of previously selected object in AIS_InteractiveContext::SetSelected; - test case for issue #26721 --- src/AIS/AIS_InteractiveContext_1.cxx | 2 +- tests/bugs/vis/bug26721 | 34 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/vis/bug26721 diff --git a/src/AIS/AIS_InteractiveContext_1.cxx b/src/AIS/AIS_InteractiveContext_1.cxx index 2cb6e921c0..64bb48460a 100644 --- a/src/AIS/AIS_InteractiveContext_1.cxx +++ b/src/AIS/AIS_InteractiveContext_1.cxx @@ -1037,7 +1037,7 @@ void AIS_InteractiveContext::SetSelected (const Handle(SelectMgr_EntityOwner)& t anObjToClear.Add (anInteractive); } anOwner->State (0); - if (theOwner == anObject->GlobalSelOwner()) + if (anOwner == anObject->GlobalSelOwner()) { myObjects.ChangeFind (anObject)->SetHilightStatus (Standard_False); } diff --git a/tests/bugs/vis/bug26721 b/tests/bugs/vis/bug26721 new file mode 100644 index 0000000000..7e9e7f9708 --- /dev/null +++ b/tests/bugs/vis/bug26721 @@ -0,0 +1,34 @@ +puts "============" +puts "CR26721" +puts "============" +puts "" + +########################################################################################## +puts "Visualization - selection highlight of selected face is broken" +########################################################################################## + +pload VISUALIZATION MODELING + +box b 1 1 1 +vinit +vdisplay b +vfit + +# select box in 0 selection mode +vselect 200 200 + +vselmode 4 1 +# select box's face +vselect 200 300 + +# check if highlight is correct: +# 1. check if other edges of the box are not highlighted +if {[vreadpixel 292 356 name] != "YELLOW 1"} { + puts "ERROR: the box is drawn with the color that isn't equal to default!" +} +# 2. check if previously selected face is highlighted with selection color +if {[vreadpixel 204 301 name] != "GRAY80 1"} { + puts "ERROR: the face selected is not highlighted with selection color!" +} + +set only_screen 1 -- 2.39.5