From a07acfa8e4dcd461beaef31c751ed2b50c2b1bf8 Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 27 Sep 2007 13:47:16 +0000 Subject: [PATCH] Minor fix --- src/GLViewer/GLViewer_ViewPort2d.h | 5 +++-- src/GLViewer/GLViewer_Viewer2d.cxx | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/GLViewer/GLViewer_ViewPort2d.h b/src/GLViewer/GLViewer_ViewPort2d.h index 400f9b27a..06034a996 100644 --- a/src/GLViewer/GLViewer_ViewPort2d.h +++ b/src/GLViewer/GLViewer_ViewPort2d.h @@ -60,8 +60,9 @@ class GLViewer_ViewPort2d: public GLViewer_ViewPort Q_OBJECT friend class GLViewer_Widget; +public: //! Dragging states - enum vpDragState{ noDrag, initDrag, inDrag }; + enum vpDragState{ noDrag = 0, initDrag, inDrag }; public: GLViewer_ViewPort2d( QWidget* parent, GLViewer_ViewFrame* theViewFrame = NULL ); @@ -117,7 +118,7 @@ public: void endRotation(); //! Checks of dragging process state - bool isDragProcess(){ return myIsDragProcess; } + int isDragProcess(){ return myIsDragProcess; } //! On/off compass void turnCompass( GLboolean on ); diff --git a/src/GLViewer/GLViewer_Viewer2d.cxx b/src/GLViewer/GLViewer_Viewer2d.cxx index efba3118a..fe0aae96f 100644 --- a/src/GLViewer/GLViewer_Viewer2d.cxx +++ b/src/GLViewer/GLViewer_Viewer2d.cxx @@ -964,6 +964,10 @@ bool GLViewer_Viewer2d::updateOperations( QMouseEvent* e ) updateAll(); return true; } + + if( vp->isDragProcess() == GLViewer_ViewPort2d::inDrag ) + return true; + if( e->state() == Qt::LeftButton && vp->startPulling( point ) ) return true; -- 2.39.2