From: mzn Date: Thu, 6 Jul 2006 16:49:12 +0000 (+0000) Subject: Fix for PAL12857. X-Git-Tag: T3_2_1_pre~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9caf5aba46053fce9214d64e4fb3d45ec46576c9;p=modules%2Fgeom.git Fix for PAL12857. --- diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 55de2df9d..94c92abfc 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -71,6 +71,8 @@ #include #include #include +#include +#include // VTK Includes #include @@ -260,6 +262,18 @@ void GEOMToolsGUI::OnColor() for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { io = GEOMBase::GetAIS( It.Value(), true ); if ( !io.IsNull() ) { + // Set color for a point + OCCViewer_Viewer* vm = dynamic_cast( window->getViewManager()->getViewModel() ); + Handle (AIS_InteractiveContext) ic = vm->getAISContext(); + Handle(AIS_Drawer) aCurDrawer = io->Attributes(); + Handle(Prs3d_PointAspect) aCurPointAspect = aCurDrawer->PointAspect(); + Quantity_Color aCurColor; + Standard_Real aCurScale; + Aspect_TypeOfMarker aCurTypeOfMarker; + aCurPointAspect->Aspect()->Values( aCurColor, aCurTypeOfMarker, aCurScale ); + aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aCurTypeOfMarker, aColor, aCurScale) ); + ic->SetLocalAttributes(io, aCurDrawer); + io->SetColor( aColor ); if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) Handle(GEOM_AISShape)::DownCast( io )->SetShadingColor( aColor );