1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0027805: Visualization - AIS_InteractiveContext::FitSelected() is broken for global selection

AIS_Selection class has been cleaned up:
- SelectMgr_EntityOwner is now used in interface instead of Standard_Transient.
- Method ::Select() has been renamed to ::Clear() for clarity.
- Dropped unused class fields.
- Owners without Selectable are not added to the list (should never happen).

SelectMgr_SelectableObject::BndBoxOfSelected() has been modified
to properly compute bounding box of ALL selection Entities
for specified Owner (only first Entity has been used before the patch).

Methods of AIS_InteractiveContext::DisplaySelected(), ::SetSelectedAspect(),
::FitSelected(), ::SubIntensityOff() have been fixed (wrong DownCast).
AIS_InteractiveContext::AddSelect() now handles properly AIS_InteractiveObject as argument.
This commit is contained in:
kgv
2016-09-03 12:23:55 +03:00
committed by bugmaster
parent 3065019c99
commit 02974a19c6
17 changed files with 370 additions and 567 deletions

26
tests/bugs/vis/bug27805 Normal file
View File

@@ -0,0 +1,26 @@
puts "============"
puts "CR27805"
puts "AIS_InteractiveContext::FitSelected() is broken for global selection"
puts "============"
puts ""
set anImgFitAll $imagedir/${casename}_fitall.png
set anImgFitSel $imagedir/${casename}_fitsel.png
set anImgDiff $imagedir/${casename}_diff.png
pload MODELING VISUALIZATION
box b 1 2 3
vclear
vinit View1
vaxo
vdisplay -dispMode 1 b
vfit
vselect 200 200
vdump $anImgFitAll
vfit -selected
vdump $anImgFitSel
set aDiffRes [diffimage $anImgFitSel $anImgFitAll 0.0 0 0 $anImgDiff]
if {$aDiffRes != 0} {
puts "Error: FitSelected() does not match FitAll() for single object"
}