From: rnv Date: Tue, 7 Feb 2017 14:05:25 +0000 (+0300) Subject: Fix for 53877 issue X-Git-Tag: SHAPER_2.7.0~3^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Frnv%2F53877;p=modules%2Fgui.git Fix for 53877 issue --- diff --git a/src/OCCViewer/OCCViewer_ViewSketcher.cxx b/src/OCCViewer/OCCViewer_ViewSketcher.cxx index 103880d52..16d028f1d 100755 --- a/src/OCCViewer/OCCViewer_ViewSketcher.cxx +++ b/src/OCCViewer/OCCViewer_ViewSketcher.cxx @@ -492,35 +492,30 @@ void OCCViewer_PolygonSketcher::onSketch( SketchState state ) if ( state != Fin ) p.drawPolyline( *mypPoints ); }*/ - if ( mypPolyRB ) - { + if ( mypPolyRB ) { + if ( state == Fin ) { + mypPolyRB->clearGeometry(); + mypPolyRB->hide(); +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + QApplication::syncX(); +#endif + mypViewWindow->activateSketching( OCCViewer_ViewWindow::NoSketching ); + } else { mypPolyRB->setUpdatesEnabled ( false ); if ( !mypPolyRB->isVisible() ) - mypPolyRB->show(); + mypPolyRB->show(); //if ( state != Debut ) // mypPolyRB->repaint(); - + if ( state != Fin && points->count() ) - mypPolyRB->initGeometry( QPolygon(*points) << myCurr ); + mypPolyRB->initGeometry( QPolygon(*points) << myCurr ); //mypPolyRB->addNode( myCurr ); - + //if ( state != Fin ) // mypPolyRB->repaint(); mypPolyRB->setUpdatesEnabled ( true ); //mypPolyRB->repaint(); } - - if ( state == Fin ) - { - if ( mypPolyRB ) - { - mypPolyRB->clearGeometry(); - mypPolyRB->hide(); - } -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QApplication::syncX(); -#endif - mypViewWindow->activateSketching( OCCViewer_ViewWindow::NoSketching ); } }