From edab38c5171f927e06199e8c8aaf72dd14d900eb Mon Sep 17 00:00:00 2001 From: mkr Date: Tue, 29 May 2007 11:16:31 +0000 Subject: [PATCH] Porting to Qt4. --- src/OCCViewer/OCCViewer_ViewWindow.cxx | 12 ++---------- src/OCCViewer/OCCViewer_ViewWindow.h | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) 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; -- 2.39.2