From: kgv Date: Wed, 7 Mar 2018 18:22:16 +0000 (+0300) Subject: 0028988: Visualization - AIS_InteractiveContext::SetLocation() does not reset locatio... X-Git-Tag: V7_3_0_beta~65 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=81ce8c4de3c940b5ff5b635d382503d462568c54;p=occt-copy.git 0028988: Visualization - AIS_InteractiveContext::SetLocation() does not reset location properly SelectMgr_SelectionManager - removed broken HasTransformation() checks. --- diff --git a/src/SelectMgr/SelectMgr_SelectableObject.cxx b/src/SelectMgr/SelectMgr_SelectableObject.cxx index dc3126d601..14f4d61ad6 100644 --- a/src/SelectMgr/SelectMgr_SelectableObject.cxx +++ b/src/SelectMgr/SelectMgr_SelectableObject.cxx @@ -265,11 +265,6 @@ void SelectMgr_SelectableObject::UpdateTransformation() void SelectMgr_SelectableObject::UpdateTransformations (const Handle(SelectMgr_Selection)& theSel) { const TopLoc_Location aSelfLocation (Transformation()); - if (aSelfLocation.IsIdentity()) - { - return; - } - for (NCollection_Vector::Iterator aSelEntIter (theSel->Entities()); aSelEntIter.More(); aSelEntIter.Next()) { if (Handle(Select3D_SensitiveEntity) aSensEntity = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive())) diff --git a/src/SelectMgr/SelectMgr_SelectionManager.cxx b/src/SelectMgr/SelectMgr_SelectionManager.cxx index a730aa4b39..86e34a126b 100644 --- a/src/SelectMgr/SelectMgr_SelectionManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectionManager.cxx @@ -345,10 +345,7 @@ void SelectMgr_SelectionManager::Activate (const Handle(SelectMgr_SelectableObje Standard_FALLTHROUGH case SelectMgr_TOU_Partial: { - if(theObject->HasTransformation()) - { - theObject->UpdateTransformations (aSelection); - } + theObject->UpdateTransformations (aSelection); theSelector->RebuildObjectsTree(); break; } @@ -846,11 +843,8 @@ void SelectMgr_SelectionManager::Update (const Handle(SelectMgr_SelectableObject Standard_FALLTHROUGH case SelectMgr_TOU_Partial: { - if (theObject->HasTransformation()) - { - theObject->UpdateTransformations (aSelection); - theSelector->RebuildObjectsTree(); - } + theObject->UpdateTransformations (aSelection); + theSelector->RebuildObjectsTree(); break; } default: diff --git a/tests/bugs/vis/bug28988 b/tests/bugs/vis/bug28988 new file mode 100644 index 0000000000..3712dfc80e --- /dev/null +++ b/tests/bugs/vis/bug28988 @@ -0,0 +1,22 @@ +puts "==================" +puts "0028988: Visualization - AIS_InteractiveContext::SetLocation() does not reset location properly" +puts "==================" +puts "" + +pload MODELING VISUALIZATION + +box b 1 2 3 +vclear +vinit View1 +vaxo +vdisplay -dispMode 1 -highMode 1 b +vfit +vmoveto 110 110 +if { "[vreadpixel 110 110 rgb name]" != "DARKTURQUOISE" } { puts "Error: shape is not selected!" } + +vlocation b -translate 1 0 0 +vmoveto 110 110 +vlocation b -reset +vmoveto 110 110 +vreadpixel 110 110 rgb name +if { "[vreadpixel 110 110 rgb name]" != "DARKTURQUOISE" } { puts "Error: resetted shape is not selected!" }