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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user