Salome HOME
porting to new OCCT 8.3.0
authorasl <asl@opencascade.com>
Mon, 26 Jun 2017 08:45:54 +0000 (11:45 +0300)
committerrnv <rnv@opencascade.com>
Thu, 6 Jul 2017 08:59:46 +0000 (11:59 +0300)
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/ViewerData/ViewerData_AISShape.cxx
src/ViewerData/ViewerData_AISShape.hxx
tools/PyEditor/src/PyEditor_FindTool.cxx

index e42313e63ca0c8447004da69e05d5544cc7323c4..784d86c0d1109440f3deeac9841221ed45a5dace 100755 (executable)
 #include <V3d_OrthographicView.hxx>
 #endif
 
 #include <V3d_OrthographicView.hxx>
 #endif
 
+#if OCC_VERSION_LARGE > 0x07010000
+#include <Quantity_Ratio.hxx>
+#endif
+
 #include "utilities.h"
 
 #if defined WIN32
 #include "utilities.h"
 
 #if defined WIN32
index 0e1b3f9f4c02ca12e50fe801d0f4d6e60f7f9f00..4e97067eee1610fa7dc9fe69f927f7ac75d35c3b 100644 (file)
   \param shape - TopoDS shape 
 */
 ViewerData_AISShape::ViewerData_AISShape (const TopoDS_Shape& theShape)
   \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)
 {
 }
   myIsClippable (true)
 {
 }
index bdb8246f459b40866b312fe8871c0aefc33d2eff..ed725f80ba38c15897f3db15e7f4734e12a65a3f 100644 (file)
 
 #ifdef USE_TEXTURED_SHAPE
   #include <AIS_TexturedShape.hxx>
 
 #ifdef USE_TEXTURED_SHAPE
   #include <AIS_TexturedShape.hxx>
+  #define BASE_SHAPE AIS_TexturedShape
 #else
   #include <AIS_Shape.hxx>
 #else
   #include <AIS_Shape.hxx>
+  #define BASE_SHAPE AIS_Shape
 #endif
 
 #include <Standard.hxx>
 #endif
 
 #include <Standard.hxx>
 #include <Basics_OCCTVersion.hxx>
 
 class ViewerData_AISShape
 #include <Basics_OCCTVersion.hxx>
 
 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);
 {
 public:
   Standard_EXPORT ViewerData_AISShape (const TopoDS_Shape& theShape);
@@ -64,18 +62,9 @@ protected:
   bool myIsClippable;
 
 public:
   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
 
 #endif // _ViewerData_AISShape_HeaderFile
index 0e41bfe65efa455bc7f51168951398830d371c62..d1cecebfd0a02e59bf5f042c16a3ee555d074705 100644 (file)
@@ -618,7 +618,7 @@ void PyEditor_FindTool::addCompletion( const QString& text, bool replace )
   QStringListModel& model = replace ? myReplaceCompletion : myFindCompletion;
 
   QStringList completions = model.stringList();
   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 );
   {
     completions.prepend( text );
     model.setStringList( completions );