Salome HOME
0021180: EDF 1772 SMESH: Set of hypothesis in 1D
[modules/smesh.git] / src / OBJECT / SMESH_PreviewActorsCollection.cxx
index d014af78c98ea1a60af3f7a07fad518daa79470f..b905f02367735c39990b15bba42e283c60074996 100644 (file)
@@ -35,7 +35,6 @@
 
 // VTK includes
 #include <vtkUnstructuredGrid.h>
-#include <vtkScalarBarActor.h>
 #include <vtkPlane.h>
 #include <vtkRenderer.h>
 #include <vtkProperty.h>
@@ -102,7 +101,7 @@ bool SMESH_PreviewActorsCollection::Init( const TopoDS_Shape& theShape, TopAbs_S
     int index = myMapOfShapes.FindIndex( exp.Current() );
     if ( index && !myMapOfActors.contains( index ) ) { 
       // create actor if the index is present
-      if ( GEOM_Actor* anActor = createActor( exp.Current() )) {
+      if ( GEOM_Actor* anActor = createActor( exp.Current().Oriented(TopAbs_FORWARD))) {
         // Create new entry for actor
         QString aString = theEntry;
         aString += QString("_%1").arg( index ); // add index to actor entry
@@ -112,7 +111,7 @@ bool SMESH_PreviewActorsCollection::Init( const TopoDS_Shape& theShape, TopAbs_S
         anIO->setEntry( aString.toLatin1().constData() );
 
         // Init Actor
-        anActor->SetVectorMode( true );
+        anActor->SetVectorMode( theType==TopAbs_EDGE );
         anActor->setIO( anIO );
         anActor->SetSelector( mySelector );
         anActor->SetPickable( true );