]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix regression (after fix for PAL21179):
authormkr <mkr@opencascade.com>
Fri, 27 Jan 2012 14:55:50 +0000 (14:55 +0000)
committermkr <mkr@opencascade.com>
Fri, 27 Jan 2012 14:55:50 +0000 (14:55 +0000)
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.

src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
src/OBJECT/GEOM_AISShape.cxx
src/OBJECT/GEOM_AISShape.hxx

index ad8b77511713e5588828ee1dc4dda2a39c50abb6..31d7d4b0cf0614c31d759ad5ebca1f50b13ec9cd 100644 (file)
@@ -797,6 +797,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
             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 ) );
index 5d2005cc0a11fd536d70317c1f9e3113d409d1b4..bce39e1ccc32267cdbf714fb8c8a60def18f2f9a 100644 (file)
@@ -340,8 +340,11 @@ void GEOMToolsGUI::OnColor()
                   }
 
                   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);
 
index dfd5bdb24b990e635c99aa3fdef1090f81aece4c..9313c6ee7c66e0b4a33cf2e8d5e08daf8854b4df 100644 (file)
@@ -192,6 +192,10 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
       restoreIsoNumbers();
 
       shadingMode(aPresentationManager, aPrs, aMode);
+
+      // Store wireframe edges colors
+      storeBoundaryColors();
+
       break;
     }
     case 3: //StdSelect_DM_HLR:
index 1626936fb47a1817b781475993e9f13e46816bc9..387b3ef37c02d38e2950157b122daf96f0c3a168 100644 (file)
@@ -124,12 +124,13 @@ public:
         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;