From: ouv Date: Thu, 27 Sep 2007 13:47:16 +0000 (+0000) Subject: Minor fix X-Git-Tag: CTH_V1_3~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a07acfa8e4dcd461beaef31c751ed2b50c2b1bf8;p=modules%2Fgui.git Minor fix --- 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;