From: imn Date: Fri, 4 Dec 2015 08:53:59 +0000 (+0300) Subject: Fix activation problem and SIGSEGV at OCCViewer and GL Viewer X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1aa683082dcceca4d93589d83c402e338dbea2a2;p=modules%2Fgui.git Fix activation problem and SIGSEGV at OCCViewer and GL Viewer --- diff --git a/src/GLViewer/GLViewer_Viewer.cxx b/src/GLViewer/GLViewer_Viewer.cxx index 395dd686f..a4667ba45 100644 --- a/src/GLViewer/GLViewer_Viewer.cxx +++ b/src/GLViewer/GLViewer_Viewer.cxx @@ -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 ); } diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 119299fec..a49d32046 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -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(); diff --git a/src/OCCViewer/OCCViewer_ViewSketcher.cxx b/src/OCCViewer/OCCViewer_ViewSketcher.cxx index c9faa3a0c..862399de9 100755 --- a/src/OCCViewer/OCCViewer_ViewSketcher.cxx +++ b/src/OCCViewer/OCCViewer_ViewSketcher.cxx @@ -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 ); } diff --git a/src/Qtx/QtxDialog.cxx b/src/Qtx/QtxDialog.cxx index 00c20734a..47a3a2867 100755 --- a/src/Qtx/QtxDialog.cxx +++ b/src/Qtx/QtxDialog.cxx @@ -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;