Salome HOME
Merge remote branch 'origin/V8_5_asterstudy'
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_VTKUtils.cxx
index 98549bdc8e0a1ab74ef3ff47a1f17cd1474758ad..b74d29e50b73237b8359e46843b9b364a6356a8d 100644 (file)
@@ -32,6 +32,7 @@
 #include "SMESHGUI_Utils.h"
 #include "SMDS_Mesh.hxx"
 #include "SMESH_Actor.h"
+#include "SMESH_ActorProps.h"
 #include "SMESH_ActorUtils.h"
 #include "SMESH_CellLabelActor.h"
 #include "SMESH_ControlsDef.hxx"
@@ -789,7 +790,7 @@ namespace SMESH
           if(SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct)){
             if(anActor->hasIO())
               if (!Update(anActor->getIO(),anActor->GetVisibility()))
-                break; // avoid multiple warinings if visu failed
+                break; // avoid multiple warnings if visu failed
           }
         }
       }
@@ -800,7 +801,7 @@ namespace SMESH
         {
           Handle(SALOME_InteractiveObject) anIO = anIter.Value();
           if ( !Update( anIO, true ))
-            break; // avoid multiple warinings if visu failed
+            break; // avoid multiple warnings if visu failed
 
           if ( withChildrenOfSelected ) // update all visible children
           {
@@ -879,6 +880,8 @@ namespace SMESH
       return;
     }
 
+    SMESH_ActorProps::props()->reset();
+
     QColor
       aHiColor = mgr->colorValue( "SMESH", "selection_object_color", Qt::white ),
       aSelColor = mgr->colorValue( "SMESH", "selection_element_color", Qt::yellow ),
@@ -920,12 +923,7 @@ namespace SMESH
         aCollection->InitTraversal();
         while ( vtkActor *anAct = aCollection->GetNextActor() ) {
           if ( SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct) ) {
-            anActor->SetHighlightColor(aHiColor.red()/255.,
-                                       aHiColor.green()/255.,
-                                       aHiColor.blue()/255.);
-            anActor->SetPreHighlightColor(aPreColor.red()/255.,
-                                          aPreColor.green()/255.,
-                                          aPreColor.blue()/255.);
+           anActor->UpdateSelectionProps();
           }
         }
       }
@@ -1422,7 +1420,7 @@ namespace SMESH
   //================================================================================
   /*!
    * \brief Find all SMESH_Actor's in the View Window.
-   * If actor constains Plot2d_Histogram object remove it from each Plot2d Viewer.
+   * If actor contains Plot2d_Histogram object remove it from each Plot2d Viewer.
    */
   //================================================================================