From: nds Date: Wed, 28 Oct 2020 18:16:27 +0000 (+0300) Subject: 0032205: Visualization - implementing new selection scheme in context - replace extra X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=69f290dd665c063b426e770cc41cd57a8d6c8fd4;p=occt-copy.git 0032205: Visualization - implementing new selection scheme in context - replace extra - implementation of additional selection scheme, mainly to deselect single selected object. (cherry picked from commit e76471b5587a36b6f8f9bec70d09e18d64002a78) # Conflicts: # src/ViewerTest/ViewerTest_ViewerCommands.cxx # Conflicts: # src/ViewerTest/ViewerTest_ViewerCommands.cxx --- diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 86cabe13c0..19741a1280 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -6916,6 +6916,10 @@ static Standard_Integer VSelect (Draw_Interpretor& , ++anArgIter; } } + else if (anArg == "-replaceextra") + { + aSelScheme = AIS_SelectionScheme_ReplaceExtra; + } else if (anArg == "-replace") { aSelScheme = AIS_SelectionScheme_Replace; diff --git a/tests/bugs/vis/bug32205 b/tests/bugs/vis/bug32205 new file mode 100644 index 0000000000..7a5ee196e2 --- /dev/null +++ b/tests/bugs/vis/bug32205 @@ -0,0 +1,28 @@ +puts "========" +puts "0032205: Visualization - implementing new selection scheme in context - replace extra" +puts "========" +puts "" + +pload MODELING VISUALIZATION +box b1 0 0 0 10 10 10 +box b2 20 20 20 30 30 30 +vclear +vinit View1 +vaxo +vdisplay -dispMode 1 b1 b2 +vfit +vselprops selHighlight -dispMode -1 +vselect 0 0 400 400 -xor +if { ![string match "*Selected*" [vstate b1]] } { puts "Error: b1 should be selected."} +if { ![string match "*Selected*" [vstate b2]] } { puts "Error: b2 should be selected."} +vselect 200 200 -replaceExtra +if { [string match "*Selected*" [vstate b1]] } { puts "Error: b1 should not be selected."} +if { ![string match "*Selected*" [vstate b2]] } { puts "Error: b2 should be selected."} +vselect 200 200 -replaceExtra +if { [string match "*Selected*" [vstate b1]] } { puts "Error: b1 should not be selected."} +if { [string match "*Selected*" [vstate b2]] } { puts "Error: b2 should not be selected."} +vselect 200 200 -replaceExtra +if { [string match "*Selected*" [vstate b1]] } { puts "Error: b1 should not be selected."} +if { ![string match "*Selected*" [vstate b2]] } { puts "Error: b2 should be selected."} + +vdump $imagedir/${casename}.png