Salome HOME
Integrate patch from G.David (for vtk 5.2 and newer)
authorvsr <vsr@opencascade.com>
Fri, 11 Dec 2009 16:29:49 +0000 (16:29 +0000)
committervsr <vsr@opencascade.com>
Fri, 11 Dec 2009 16:29:49 +0000 (16:29 +0000)
src/OBJECT/SMESH_Actor.cxx
src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx

index 7a37d65410b17301f6db14ab0fb145891d3ea17f..03955716341b19f906592612abf12cc7c5915d31 100644 (file)
@@ -404,9 +404,7 @@ SMESH_ActorDef::SMESH_ActorDef()
     
   myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
   myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput());
-#if (VTK_XVERSION >= 0x050200)
-  myPtsLabeledDataMapper->SetLabelFormat("%d");
-#else
+#if (VTK_XVERSION < 0x050200)
   myPtsLabeledDataMapper->SetLabelFormat("%g");
 #endif
   myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
@@ -449,9 +447,7 @@ SMESH_ActorDef::SMESH_ActorDef()
     
   myClsLabeledDataMapper = vtkLabeledDataMapper::New();
   myClsLabeledDataMapper->SetInput(myClsSelectVisiblePoints->GetOutput());
-#if (VTK_XVERSION >= 0x050200)
-  myClsLabeledDataMapper->SetLabelFormat("%d");
-#else
+#if (VTK_XVERSION < 0x050200)
   myClsLabeledDataMapper->SetLabelFormat("%g");
 #endif
   myClsLabeledDataMapper->SetLabelModeToLabelScalars();
index 5c84c204b21e0656ad24293091323b7b2b13cb12..f2e235908c1aab15c8d37330573633fde73a348d 100644 (file)
 #include <vtkIntArray.h>
 #include <vtkProperty2D.h>
 #include <vtkPointData.h>
+#include <vtkConfigure.h>
+#if !defined(VTK_XVERSION)
+#define VTK_XVERSION (VTK_MAJOR_VERSION<<16)+(VTK_MINOR_VERSION<<8)+(VTK_BUILD_VERSION)
+#endif
 
 // Qt includes
 #include <QApplication>
@@ -145,7 +149,9 @@ namespace SMESH
     
       myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
       myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput());
+#if (VTK_XVERSION < 0x050200)
       myPtsLabeledDataMapper->SetLabelFormat("%g");
+#endif
       myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
     
       vtkTextProperty* aPtsTextProp = vtkTextProperty::New();