]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix activation problem and SIGSEGV at OCCViewer and GL Viewer
authorimn <imn@opencascade.com>
Fri, 4 Dec 2015 08:53:59 +0000 (11:53 +0300)
committerimn <imn@opencascade.com>
Fri, 4 Dec 2015 08:53:59 +0000 (11:53 +0300)
src/GLViewer/GLViewer_Viewer.cxx
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_ViewSketcher.cxx
src/Qtx/QtxDialog.cxx

index 395dd686f63cbfaf48381e6053c90e63421c0889..a4667ba45d44024d096c9f36f80dbd63a69a39d7 100644 (file)
@@ -890,8 +890,6 @@ void GLViewer_ViewSketcher::onSketch( SketchState state )
     {
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
        QApplication::syncX();  /* force rectangle redrawing */
-#else
-        QApplication::sync();  /* force rectangle redrawing */
 #endif
         myViewer->activateSketching( GLViewer_Viewer::NoSketching );
     }
index 119299fecc501a6477e5ef4a1d868eef8f2d2383..a49d32046a261c04f116c1b4a1765edef24a8a8d 100755 (executable)
@@ -592,8 +592,6 @@ void OCCViewer_ViewPort3d::paintEvent( QPaintEvent* e )
   if ( !myWindow.IsNull() ) {
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QApplication::syncX();
-#else
-    QApplication::sync();
 #endif
     QRect rc = e->rect();
     if ( !myPaintersRedrawing )
@@ -608,15 +606,13 @@ void OCCViewer_ViewPort3d::paintEvent( QPaintEvent* e )
 */
 void OCCViewer_ViewPort3d::resizeEvent( QResizeEvent* e )
 {
-#ifdef WIN32
+#if defined WIN32 || QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
   /* Win32 : map before first show to avoid flicker */
   if ( !mapped( activeView() ) )
     mapView( activeView() );
 #endif
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QApplication::syncX();
-#else
-    QApplication::sync();
 #endif
   if ( !activeView().IsNull() )
     activeView()->MustBeResized();
index c9faa3a0c799641e09bc01575c1068667516e987..862399de995dae21dc1a6a6cd27c2253555fb263 100755 (executable)
@@ -300,8 +300,6 @@ void OCCViewer_RectSketcher::onSketch( SketchState state )
   {
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QApplication::syncX();  /* force rectangle redrawing */
-#else
-    QApplication::sync();  /* force rectangle redrawing */
 #endif
     mypViewWindow->activateSketching( OCCViewer_ViewWindow::NoSketching );
   }
@@ -521,8 +519,6 @@ void OCCViewer_PolygonSketcher::onSketch( SketchState state )
       }
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     QApplication::syncX();
-#else
-    QApplication::sync();
 #endif
     mypViewWindow->activateSketching( OCCViewer_ViewWindow::NoSketching );
   }
index 00c20734a8ff4fda1e3a8b8cc393f85ef75099cd..47a3a28672f6497616355673f96d5882a8571f32 100755 (executable)
@@ -1444,8 +1444,6 @@ void QtxDialog::emitSignal()
   QApplication::instance()->processEvents();
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   QApplication::syncX();
-#else
-  QApplication::sync();
 #endif
   int id = buttonId( (QAbstractButton*)mySender );
   mySender = 0;