]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
INT PAL 0052383: TC7.4.0: color is not changed in VTK scene
authormpa <mpa@opencascade.com>
Thu, 17 Apr 2014 08:59:38 +0000 (12:59 +0400)
committermpa <mpa@opencascade.com>
Thu, 17 Apr 2014 08:59:38 +0000 (12:59 +0400)
src/GEOMGUI/GEOMGUI_Selection.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/OBJECT/GEOM_Actor.cxx

index 4f8a71c7d9310758ff7e75957edab09bdb095a6a..3e6f31a31f2221e11a5bb059c2ae20f8ec3371c9 100644 (file)
     else \
       str = QString(); }
 
-#define VTK_DISPLAY_MODE_TO_STRING( str, dm ) { \
-    if ( dm == 0 ) \
-      str = QString( "Wireframe" ); \
-    else if ( dm == 1 )    \
-      str = QString( "Shading" ); \
-    else if ( dm == 3 )    \
-      str = QString( "ShadingWithEdges" ); \
-    else \
-      str = QString(); }
-
 #define USE_VISUAL_PROP_MAP
 
+#ifdef USE_VISUAL_PROP_MAP
+  #define VTK_DISPLAY_MODE_TO_STRING( str, dm ) { \
+      if ( dm == 0 ) \
+        str = QString( "Wireframe" ); \
+      else if ( dm == 1 )    \
+        str = QString( "Shading" ); \
+      else if ( dm == 2 )    \
+        str = QString( "ShadingWithEdges" ); \
+      else \
+        str = QString(); }
+#else
+  #define VTK_DISPLAY_MODE_TO_STRING( str, dm ) { \
+      if ( dm == 0 ) \
+        str = QString( "Wireframe" ); \
+      else if ( dm == 1 )    \
+        str = QString( "Shading" ); \
+      else if ( dm == 3 )    \
+        str = QString( "ShadingWithEdges" ); \
+      else \
+        str = QString(); }
+#endif
+
 GEOMGUI_Selection::GEOMGUI_Selection()
 : LightApp_Selection()
 {
index 16131193cdc31d27ef22bd16af97b05871fd2e83..595efd5bf4e16578093b4d9159eb363297e90e32 100644 (file)
@@ -1059,7 +1059,7 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
     }
 
     // - standalone edge color
-    c = propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>();
+    c = propMap.value( GEOM::propertyName( GEOM::LineColor ) ).value<QColor>();
     actor->SetIsolatedEdgeColor( c.redF(), c.greenF(), c.blueF() );
 
     c = propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>();
index 3d8ce93bfc648a444f23ff613de720c2202caf87..92860af3e66d20007486a00028423dd41ce335af 100644 (file)
@@ -309,9 +309,9 @@ setDisplayMode(int theMode)
 
   if ( theMode == (int)eShadingWithEdges ) {
     // Coloring edges
-    myIsolatedEdgeActor->GetProperty()->SetColor(myEdgesInShadingColor[0],
-                                                 myEdgesInShadingColor[1],
-                                                 myEdgesInShadingColor[2]);
+    myIsolatedEdgeActor->GetProperty()->SetColor(myIsolatedEdgeColor[0],
+                                                 myIsolatedEdgeColor[1],
+                                                 myIsolatedEdgeColor[2]);
     myOneFaceEdgeActor->GetProperty()->SetColor(myEdgesInShadingColor[0],
                                                 myEdgesInShadingColor[1],
                                                 myEdgesInShadingColor[2]);
@@ -757,8 +757,7 @@ void GEOM_Actor::SetPointColor(double r,  double g,  double b)
 void GEOM_Actor::SetIsolatedEdgeColor(double r, double g,  double b)
 {
   myIsolatedEdgeColor[0] = r; myIsolatedEdgeColor[1] = g; myIsolatedEdgeColor[2] = b;
-  if ( myDisplayMode != (int)eShadingWithEdges )
-    myIsolatedEdgeActor->GetProperty()->SetColor(r, g, b);
+  myIsolatedEdgeActor->GetProperty()->SetColor(r, g, b);
 }
 
 /*!