]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To fix a position of the view name's label during scroll-bars' dragging.
authorouv <ouv@opencascade.com>
Mon, 27 Dec 2010 13:26:45 +0000 (13:26 +0000)
committerouv <ouv@opencascade.com>
Mon, 27 Dec 2010 13:26:45 +0000 (13:26 +0000)
src/GraphicsView/GraphicsView_ViewPort.cxx
src/GraphicsView/GraphicsView_ViewPort.h

index 550aa204097cd2643f5f688191f7591112ad76f0..18bfa5f5016640a6e055cd81ee1bcceb63ad05ec 100644 (file)
@@ -1149,3 +1149,18 @@ void GraphicsView_ViewPort::onContextMenuEvent( QGraphicsSceneContextMenuEvent*
 {
   emit vpContextMenuEvent( e );
 }
+
+//================================================================
+// Function : scrollContentsBy
+// Purpose  : 
+//================================================================
+void GraphicsView_ViewPort::scrollContentsBy( int theDX, int theDY )
+{
+  if( myNameLabel )
+    myNameLabel->setAcceptMoveEvents( false );
+
+  QGraphicsView::scrollContentsBy( theDX, theDY );
+
+  if( myNameLabel )
+    myNameLabel->setAcceptMoveEvents( true );
+}
index d6de601f5e9c326603a6a3160b3eb15f322272ac..8cba516b0ffb60b730b1ff59b9dbb046dddc59f3 100644 (file)
@@ -155,6 +155,9 @@ protected slots:
   void                             onWheelEvent( QGraphicsSceneWheelEvent* );
   void                             onContextMenuEvent( QGraphicsSceneContextMenuEvent* );
 
+protected:
+  virtual void                     scrollContentsBy( int theDX, int theDY );
+
 signals:
   void                             vpMouseEvent( QGraphicsSceneMouseEvent* );
   void                             vpWheelEvent( QGraphicsSceneWheelEvent* );