From b872b1983a4a19890845b4a8580b17d4ee944693 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 18 Nov 2009 07:27:36 +0000 Subject: [PATCH] Integrate patch from G.David (for VTK 5.2) --- src/VTKViewer/VTKViewer_Trihedron.cxx | 8 -------- src/VTKViewer/VTKViewer_Trihedron.h | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/VTKViewer/VTKViewer_Trihedron.cxx b/src/VTKViewer/VTKViewer_Trihedron.cxx index 722d8ab58..b0a608231 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.cxx +++ b/src/VTKViewer/VTKViewer_Trihedron.cxx @@ -46,10 +46,6 @@ // QT includes #include -#if !defined(VTK_XVERSION) -#define VTK_XVERSION (VTK_MAJOR_VERSION<<16)+(VTK_MINOR_VERSION<<8)+(VTK_BUILD_VERSION) -#endif - vtkStandardNewMacro(VTKViewer_UnScaledActor); /*!Constructor*/ @@ -171,11 +167,7 @@ VTKViewer_Axis::VTKViewer_Axis() myTextMapper = vtkTextMapper::New(); myLabelActor = vtkTextActor::New(); -#if (VTK_XVERSION > 0x050000) - myLabelActor->SetMapper(vtkPolyDataMapper2D::SafeDownCast(myTextMapper)); -#else myLabelActor->SetMapper(myTextMapper); -#endif myLabelActor->ScaledTextOff(); myLabelActor->PickableOff(); diff --git a/src/VTKViewer/VTKViewer_Trihedron.h b/src/VTKViewer/VTKViewer_Trihedron.h index 501222956..efb510b17 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.h +++ b/src/VTKViewer/VTKViewer_Trihedron.h @@ -40,10 +40,16 @@ class vtkTextMapper; class VTKViewer_Axis; +#if !defined(VTK_XVERSION) +#define VTK_XVERSION (VTK_MAJOR_VERSION<<16)+(VTK_MINOR_VERSION<<8)+(VTK_BUILD_VERSION) +#endif + // VTKViewer_UnScaledActor is temporarily replaced with simple vtkTextActor // This workaround caused by the bug with disappeared labels of the trihedron // reproduced after migration from qt-4.4.3 to qt-4.5.2 +#if (VTK_XVERSION <= 0x050000) #define IPAL21440 +#endif /*! \class vtkFollower * See vtk documentation -- 2.39.2