Salome HOME
Patch for MacOS (from SALOME forum)
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewSketcher.cxx
index c8044560f95f2ecb8397fb31bd70e7ed27c0aa35..103880d525d32046e562446532140f8b50ccf95e 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -298,7 +298,9 @@ void OCCViewer_RectSketcher::onSketch( SketchState state )
 
   if ( state == Fin )
   {
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QApplication::syncX();  /* force rectangle redrawing */
+#endif
     mypViewWindow->activateSketching( OCCViewer_ViewWindow::NoSketching );
   }
 }
@@ -515,7 +517,9 @@ void OCCViewer_PolygonSketcher::onSketch( SketchState state )
         mypPolyRB->clearGeometry();
         mypPolyRB->hide();
       }
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QApplication::syncX();
+#endif
     mypViewWindow->activateSketching( OCCViewer_ViewWindow::NoSketching );
   }
 }