From: vsr Date: Fri, 11 Dec 2009 16:29:49 +0000 (+0000) Subject: Integrate patch from G.David (for vtk 5.2 and newer) X-Git-Tag: V6_0_0~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bf9d590cdaecbe7c0d55be058d28f745d23fc096;p=modules%2Fsmesh.git Integrate patch from G.David (for vtk 5.2 and newer) --- diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 7a37d6541..039557163 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -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(); diff --git a/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx index 5c84c204b..f2e235908 100644 --- a/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx @@ -73,6 +73,10 @@ #include #include #include +#include +#if !defined(VTK_XVERSION) +#define VTK_XVERSION (VTK_MAJOR_VERSION<<16)+(VTK_MINOR_VERSION<<8)+(VTK_BUILD_VERSION) +#endif // Qt includes #include @@ -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();