From bf9d590cdaecbe7c0d55be058d28f745d23fc096 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 11 Dec 2009 16:29:49 +0000 Subject: [PATCH] Integrate patch from G.David (for vtk 5.2 and newer) --- src/OBJECT/SMESH_Actor.cxx | 8 ++------ src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) 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(); -- 2.39.2