mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
0028988: Visualization - AIS_InteractiveContext::SetLocation() does not reset location properly
SelectMgr_SelectionManager - removed broken HasTransformation() checks.
This commit is contained in:
@@ -265,11 +265,6 @@ void SelectMgr_SelectableObject::UpdateTransformation()
|
|||||||
void SelectMgr_SelectableObject::UpdateTransformations (const Handle(SelectMgr_Selection)& theSel)
|
void SelectMgr_SelectableObject::UpdateTransformations (const Handle(SelectMgr_Selection)& theSel)
|
||||||
{
|
{
|
||||||
const TopLoc_Location aSelfLocation (Transformation());
|
const TopLoc_Location aSelfLocation (Transformation());
|
||||||
if (aSelfLocation.IsIdentity())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
||||||
{
|
{
|
||||||
if (Handle(Select3D_SensitiveEntity) aSensEntity = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive()))
|
if (Handle(Select3D_SensitiveEntity) aSensEntity = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive()))
|
||||||
|
@@ -345,10 +345,7 @@ void SelectMgr_SelectionManager::Activate (const Handle(SelectMgr_SelectableObje
|
|||||||
Standard_FALLTHROUGH
|
Standard_FALLTHROUGH
|
||||||
case SelectMgr_TOU_Partial:
|
case SelectMgr_TOU_Partial:
|
||||||
{
|
{
|
||||||
if(theObject->HasTransformation())
|
theObject->UpdateTransformations (aSelection);
|
||||||
{
|
|
||||||
theObject->UpdateTransformations (aSelection);
|
|
||||||
}
|
|
||||||
theSelector->RebuildObjectsTree();
|
theSelector->RebuildObjectsTree();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -846,11 +843,8 @@ void SelectMgr_SelectionManager::Update (const Handle(SelectMgr_SelectableObject
|
|||||||
Standard_FALLTHROUGH
|
Standard_FALLTHROUGH
|
||||||
case SelectMgr_TOU_Partial:
|
case SelectMgr_TOU_Partial:
|
||||||
{
|
{
|
||||||
if (theObject->HasTransformation())
|
theObject->UpdateTransformations (aSelection);
|
||||||
{
|
theSelector->RebuildObjectsTree();
|
||||||
theObject->UpdateTransformations (aSelection);
|
|
||||||
theSelector->RebuildObjectsTree();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
22
tests/bugs/vis/bug28988
Normal file
22
tests/bugs/vis/bug28988
Normal file
@@ -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!" }
|
Reference in New Issue
Block a user