From 50cae9687f9831c12c24592ab72e1af12d3150f3 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 26 Jun 2017 11:45:54 +0300 Subject: [PATCH] porting to new OCCT 8.3.0 --- src/OCCViewer/OCCViewer_ViewPort3d.cxx | 4 ++++ src/ViewerData/ViewerData_AISShape.cxx | 6 +----- src/ViewerData/ViewerData_AISShape.hxx | 21 +++++---------------- tools/PyEditor/src/PyEditor_FindTool.cxx | 2 +- 4 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index e42313e63..784d86c0d 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -51,6 +51,10 @@ #include #endif +#if OCC_VERSION_LARGE > 0x07010000 +#include +#endif + #include "utilities.h" #if defined WIN32 diff --git a/src/ViewerData/ViewerData_AISShape.cxx b/src/ViewerData/ViewerData_AISShape.cxx index 0e1b3f9f4..4e97067ee 100644 --- a/src/ViewerData/ViewerData_AISShape.cxx +++ b/src/ViewerData/ViewerData_AISShape.cxx @@ -33,11 +33,7 @@ \param shape - TopoDS shape */ ViewerData_AISShape::ViewerData_AISShape (const TopoDS_Shape& theShape) -#ifdef USE_TEXTURED_SHAPE -: AIS_TexturedShape (theShape), -#else -: AIS_Shape (theShape), -#endif +: BASE_SHAPE (theShape), myIsClippable (true) { } diff --git a/src/ViewerData/ViewerData_AISShape.hxx b/src/ViewerData/ViewerData_AISShape.hxx index bdb8246f4..ed725f80b 100644 --- a/src/ViewerData/ViewerData_AISShape.hxx +++ b/src/ViewerData/ViewerData_AISShape.hxx @@ -28,8 +28,10 @@ #ifdef USE_TEXTURED_SHAPE #include + #define BASE_SHAPE AIS_TexturedShape #else #include + #define BASE_SHAPE AIS_Shape #endif #include @@ -38,11 +40,7 @@ #include class ViewerData_AISShape -#ifdef USE_TEXTURED_SHAPE - : public AIS_TexturedShape -#else - : public AIS_Shape -#endif + : public BASE_SHAPE { public: Standard_EXPORT ViewerData_AISShape (const TopoDS_Shape& theShape); @@ -64,18 +62,9 @@ protected: bool myIsClippable; public: - -#ifdef USE_TEXTURED_SHAPE - OCCT_DEFINE_STANDARD_RTTIEXT(ViewerData_AISShape,AIS_TexturedShape) -#else - OCCT_DEFINE_STANDARD_RTTIEXT(ViewerData_AISShape,AIS_Shape) -#endif + OCCT_DEFINE_STANDARD_RTTIEXT(ViewerData_AISShape, BASE_SHAPE) }; -#ifdef USE_TEXTURED_SHAPE - DEFINE_STANDARD_HANDLE(ViewerData_AISShape, AIS_TexturedShape) -#else - DEFINE_STANDARD_HANDLE(ViewerData_AISShape, AIS_Shape) -#endif +DEFINE_STANDARD_HANDLE(ViewerData_AISShape, BASE_SHAPE) #endif // _ViewerData_AISShape_HeaderFile diff --git a/tools/PyEditor/src/PyEditor_FindTool.cxx b/tools/PyEditor/src/PyEditor_FindTool.cxx index 0e41bfe65..d1cecebfd 100644 --- a/tools/PyEditor/src/PyEditor_FindTool.cxx +++ b/tools/PyEditor/src/PyEditor_FindTool.cxx @@ -618,7 +618,7 @@ void PyEditor_FindTool::addCompletion( const QString& text, bool replace ) QStringListModel& model = replace ? myReplaceCompletion : myFindCompletion; QStringList completions = model.stringList(); - if ( !text.isEmpty() and !completions.contains( text ) ) + if ( !text.isEmpty() && !completions.contains( text ) ) { completions.prepend( text ); model.setStringList( completions ); -- 2.39.2