0030672: Visualization - AIS_InteractiveContext::SetLocation() sets invalid selection... IR-2019-04-26
authorkgv <kgv@opencascade.com>
Wed, 24 Apr 2019 06:16:19 +0000 (09:16 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 26 Apr 2019 13:59:35 +0000 (16:59 +0300)
SelectMgr_SelectionManager::Remove() now deactivates selection before removal.

src/SelectMgr/SelectMgr_SelectionManager.cxx
tests/bugs/vis/bug30672 [new file with mode: 0644]

index b8cb33e..195ed54 100644 (file)
@@ -90,6 +90,7 @@ void SelectMgr_SelectionManager::Remove (const Handle(SelectMgr_SelectableObject
       {
         mySelector->RemoveSelectionOfObject (theObject, aSelIter.Value());
         aSelIter.Value()->UpdateBVHStatus (SelectMgr_TBU_Remove);
+        mySelector->Deactivate (aSelIter.Value());
       }
       mySelector->RemoveSelectableObject (theObject);
     }
diff --git a/tests/bugs/vis/bug30672 b/tests/bugs/vis/bug30672
new file mode 100644 (file)
index 0000000..49e80cd
--- /dev/null
@@ -0,0 +1,21 @@
+puts "============="
+puts "0030672: Visualization - AIS_InteractiveContext::SetLocation() sets invalid selection BVH flag to removed object"
+puts "============="
+
+pload MODELING VISUALIZATION
+box b 1 2 3
+vclear
+vinit View1
+vaxo
+vdisplay -dispMode 1 -highMode 1 b
+vfit
+vremove -context b
+vlocation b -setLocation 2 0 0
+vdisplay -dispMode 1 b
+vmoveto 200 200
+if { [vreadpixel 150 150 -rgb -name] != "BLACK" } { puts "Error: wrong prs location" }
+if { [vreadpixel 300 300 -rgb -name] != "DARKGOLDENROD3" } { puts "Error: wrong sel location" }
+vmoveto 300 300
+if { [vreadpixel 300 300 -rgb -name] != "DARKTURQUOISE" } { puts "Error: wrong highlighting" }
+
+vdump $imagedir/${casename}.png