1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025335: Visualization - method ::SelectedShape() in AIS_LocalContext and AIS_InteractiveContext overrides shape transformation

Shape location overriding fixed by combining AIS object transformation and shape location.
Also incorrect highlight presentation (and sensitive) placement was possible.
This commit is contained in:
duv
2014-10-08 13:01:51 +04:00
committed by bugmaster
parent de6f281fe9
commit d81101039f
5 changed files with 89 additions and 15 deletions

View File

@@ -1122,10 +1122,14 @@ TopoDS_Shape AIS_InteractiveContext::SelectedShape() const
{
if (!HasOpenedContext())
{
TopoDS_Shape sh;
Handle(AIS_Shape) shape = Handle(AIS_Shape)::DownCast(SelectedInteractive());
if (!shape.IsNull()) sh = shape->Shape().Located (SelectedInteractive()->Transformation());
return sh;
TopoDS_Shape aResShape;
Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (SelectedInteractive());
if (!aShape.IsNull())
{
aResShape = aShape->Shape().Located (TopLoc_Location (SelectedInteractive()->Transformation()) * aShape->Shape().Location());
}
return aResShape;
}
else
{