]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix for PAL12857.
authormzn <mzn@opencascade.com>
Thu, 6 Jul 2006 16:49:12 +0000 (16:49 +0000)
committermzn <mzn@opencascade.com>
Thu, 6 Jul 2006 16:49:12 +0000 (16:49 +0000)
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx

index 55de2df9d20b19631ad7fd01f8836c0a1c0ad1b0..94c92abfc2b8f69d2ca66a6a52d4a3748b693f1d 100644 (file)
@@ -71,6 +71,8 @@
 #include <AIS_ListOfInteractive.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <Prs3d_IsoAspect.hxx>
+#include <Prs3d_PointAspect.hxx>
+#include <Graphic3d_AspectMarker3d.hxx>
 
 // VTK Includes
 #include <vtkBMPReader.h>
@@ -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<OCCViewer_Viewer*>( 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 );