From d5b64a8295cd3bb122afff8b9d70d6d2a7ebfcf7 Mon Sep 17 00:00:00 2001 From: sln Date: Mon, 12 Apr 2010 08:28:43 +0000 Subject: [PATCH] QT 4.6.2 porting --- src/Plot2d/Plot2d_ViewFrame.cxx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 78a45eaaf..59368cb1f 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -881,24 +881,21 @@ int Plot2d_ViewFrame::testOperation( const QMouseEvent& me ) const int panBtn = Qt::ControlModifier | Qt::MidButton; const int fitBtn = Qt::ControlModifier | Qt::RightButton; - switch (btn) - { - case zoomBtn: - { - QPixmap zoomPixmap (imageZoomCursor); - QCursor zoomCursor (zoomPixmap); - myPlot->canvas()->setCursor( zoomCursor ); - return ZoomId; - } - case panBtn: + if ( btn == zoomBtn ) { + QPixmap zoomPixmap (imageZoomCursor); + QCursor zoomCursor (zoomPixmap); + myPlot->canvas()->setCursor( zoomCursor ); + return ZoomId; + } + else if ( btn == panBtn ) { myPlot->canvas()->setCursor( QCursor( Qt::SizeAllCursor ) ); return PanId; - case fitBtn: + } + else if ( btn == fitBtn ) { myPlot->canvas()->setCursor( QCursor( Qt::PointingHandCursor ) ); return FitAreaId; - default : - return NoOpId; } + return NoOpId; } /*! -- 2.39.2