1) OCC viewer: get the correct default color for wireframe mode from preferences;
2) OCC viewer: change edges color for wireframe mode after change the color of the shape.
anAspect = AISShape->Attributes()->UnFreeBoundaryAspect();
anAspect->SetColor( aColor );
AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect );
+ AISShape->storeBoundaryColors();
// Set free boundaries aspect
col = aResMgr->colorValue( "Geometry", "free_bound_color", QColor( 0, 255, 0 ) );
}
io->SetColor( aColor );
- if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) )
- Handle(GEOM_AISShape)::DownCast( io )->SetShadingColor( aColor );
+ if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) {
+ Handle(GEOM_AISShape) aGAISShape = Handle(GEOM_AISShape)::DownCast( io );
+ aGAISShape->SetShadingColor( aColor );
+ aGAISShape->storeBoundaryColors();
+ }
appStudy->setObjectProperty(mgrId,It.Value()->getEntry(), COLOR_PROP, c);
restoreIsoNumbers();
shadingMode(aPresentationManager, aPrs, aMode);
+
+ // Store wireframe edges colors
+ storeBoundaryColors();
+
break;
}
case 3: //StdSelect_DM_HLR:
void restoreIsoNumbers();
void resetIsoNumbers();
+ void storeBoundaryColors();
+
protected:
void shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPrs,
const Standard_Integer aMode);
- void storeBoundaryColors();
void restoreBoundaryColors();
Quantity_Color myShadingColor;