From: mkr Date: Tue, 29 May 2007 11:16:31 +0000 (+0000) Subject: Porting to Qt4. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=edab38c5171f927e06199e8c8aaf72dd14d900eb;p=modules%2Fgui.git Porting to Qt4. --- diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 4fe1ad855..631dc6e92 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -777,10 +777,6 @@ void OCCViewer_ViewWindow::resetState() { myDrawRect = false; - /* make rectangle empty (left > right) */ - myRect.setLeft(2); - myRect.setRight(0); - if ( myRotationPointSelection ) { QCursor handCursor (Qt::PointingHandCursor); @@ -808,15 +804,11 @@ void OCCViewer_ViewWindow::drawRect() { if ( !myRectBand ) myRectBand = new QRubberBand( QRubberBand::Rectangle, myViewPort ); - + myRectBand->hide(); + QRect aRect = SUIT_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY); - if ( !myRect.isEmpty() ) { - myRectBand->setGeometry( myRect ); - myRectBand->setVisible( myRect.isValid() ); - } myRectBand->setGeometry( aRect ); myRectBand->setVisible( aRect.isValid() ); - myRect = aRect; } /*! diff --git a/src/OCCViewer/OCCViewer_ViewWindow.h b/src/OCCViewer/OCCViewer_ViewWindow.h index 86f4c7c42..d5b7a9a5a 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.h +++ b/src/OCCViewer/OCCViewer_ViewWindow.h @@ -169,7 +169,6 @@ protected: bool myEnableDrawMode; bool myPaintersRedrawing; // set to draw with external painters - QRect myRect; QCursor myCursor; QToolBar* myToolBar;