SOCC_Prs* aPrs =
dynamic_cast<SOCC_Prs*> (anIt.value());
+ GEOMGUI_AnnotationAttrs::Properties aProperty;
+ GEOM::GEOM_Object_ptr anObject;
+ getObject( theEntry, anIt.key(), anObject, aProperty );
+ TopoDS_Shape aShape = GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), anObject );
+ gp_Ax3 aShapeLCS = gp_Ax3().Transformed( aShape.Location().Transformation() );
+
AIS_ListOfInteractive aIObjects;
aPrs->GetObjects( aIObjects );
AIS_ListOfInteractive::Iterator aIOIt( aIObjects );
continue;
setDisplayProperties( aPresentation, aView, theEntry );
+
+ if ( !aShape.IsNull() ) {
+
+ gp_Ax3 aShapeLCS = gp_Ax3().Transformed( aShape.Location().Transformation() );
+ GEOMGUI_AnnotationAttrs::SetupPresentation( aPresentation, aProperty, aShapeLCS );
+ if ( aProperty.ShapeType == TopAbs_SHAPE ) {
+ aPresentation->SetHilightShape( aShape );
+ }
+ else if ( aProperty.ShapeIndex > 0 ) {
+ TopTools_IndexedMapOfShape aSubShapeMap;
+ TopExp::MapShapes( aShape, static_cast<TopAbs_ShapeEnum>( aProperty.ShapeType ), aSubShapeMap );
+ if ( aProperty.ShapeIndex <= aSubShapeMap.Extent() ) {
+ aPresentation->SetHilightShape( aSubShapeMap( aProperty.ShapeIndex ) );
+ }
+ }
+ }
+
+ aView->getAISContext()->Redisplay( aPresentation );
}
}
getDisplayer()->UpdateViewer();
SetIsScreenFixed( Standard_False );
SetAttachPoint( gp_Pnt( 0.0, 0.0, 0.0 ) );
SetDisplayMode( 0 );
- SetZLayer( Graphic3d_ZLayerId_Top );
+ SetZLayer( Graphic3d_ZLayerId_Default );
SetAutoHide( Standard_True );
SetHilightMode( HighlightAll );
SetMutable( Standard_True );
AIS_InteractiveObject::SetTransformPersistence( aPersistence );
- SetZLayer( myIsScreenFixed ? Graphic3d_ZLayerId_Topmost : Graphic3d_ZLayerId_Top );
+ SetZLayer( myIsScreenFixed ? Graphic3d_ZLayerId_Topmost : Graphic3d_ZLayerId_Default );
SetToUpdate();
// =======================================================================
void GEOM_Annotation::SetDefaultZLayer()
{
- SetZLayer( myIsScreenFixed ? Graphic3d_ZLayerId_Topmost : Graphic3d_ZLayerId_Top );
+ SetZLayer( myIsScreenFixed ? Graphic3d_ZLayerId_Topmost : Graphic3d_ZLayerId_Default );
SetToUpdate();
}
myPrsSh->SetZLayer ( Selectable()->ZLayer() );
- thePM->Color( Selectable(), theStyle, theMode, NULL, Selectable()->ZLayer() );
+ thePM->Color( Selectable(), theStyle, theMode, NULL, Graphic3d_ZLayerId_Topmost );
+
thePM->Color( myPrsSh, theStyle, theMode, Selectable(), Graphic3d_ZLayerId_Topmost );
}