From: vpa Date: Tue, 25 Aug 2015 09:41:56 +0000 (+0300) Subject: 0026596: Visualization - hidden twice times structure should not be selectable X-Git-Tag: V7_0_0_beta~339 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=0824e32eb10170025196404d414318ed14f3a121;p=occt-copy.git 0026596: Visualization - hidden twice times structure should not be selectable Activated selection mode for the object that was displayed previously is now added to global status; Test case for issue #26596 --- diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index dc7ae26b75..fb959a1fa5 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -534,6 +534,8 @@ void AIS_InteractiveContext::Display (const Handle(AIS_InteractiveObject)& theIO } if (!mgrSelector->IsActivated (theIObj, theSelectionMode)) { + if (!aStatus->IsSModeIn (theSelectionMode)) + aStatus->AddSelectionMode (theSelectionMode); mgrSelector->Activate (theIObj, theSelectionMode, myMainSel); } } diff --git a/tests/bugs/vis/bug26596 b/tests/bugs/vis/bug26596 new file mode 100644 index 0000000000..6a218104bd --- /dev/null +++ b/tests/bugs/vis/bug26596 @@ -0,0 +1,31 @@ +puts "============" +puts "CR26596" +puts "============" +puts "" + +########################################################################################## +puts "Visualization - hidden twice times structure should not be selectable" +########################################################################################## + +pload MODELING VISUALIZATION + +box b 1 2 3 +vinit View1 +vclear +vaxo +vsetdispmode 1 + +vdisplay b +vfit +verase b + +vdisplay b +verase b + +vmoveto 250 250 +set aResColor [vreadpixel 165 263] +if {$aResColor == "0 1 1 1"} { + puts "ERROR: Zero selection mode was not deactivated at second AIS_InteractiveContext::Erase call" +} + +set only_screen 1