]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Minor fix
authorouv <ouv@opencascade.com>
Thu, 27 Sep 2007 13:47:16 +0000 (13:47 +0000)
committerouv <ouv@opencascade.com>
Thu, 27 Sep 2007 13:47:16 +0000 (13:47 +0000)
src/GLViewer/GLViewer_ViewPort2d.h
src/GLViewer/GLViewer_Viewer2d.cxx

index 400f9b27a72773537023235d024221808d95def3..06034a9968c8299396157e226b0dabd5b0b67df2 100644 (file)
@@ -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 );
index efba3118a20fb481a420c34525e998b67592cab1..fe0aae96fefbacd07717bdc647298d52e6a3b022 100644 (file)
@@ -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;