X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGraphicsView%2FGraphicsView_Viewer.cxx;h=cc55ba5d7361d6457e0bc8f6f97680ee21e72fc0;hb=efe3cdefadc31ad9cdaa9fd7fc368e2931cebdf1;hp=a8e1511b2c360aec3bb3d834f2eda335abd788f5;hpb=797f7c8b3ebf8d8a1eabc9082f8bd79f6f7ea413;p=modules%2Fgui.git diff --git a/src/GraphicsView/GraphicsView_Viewer.cxx b/src/GraphicsView/GraphicsView_Viewer.cxx index a8e1511b2..cc55ba5d7 100644 --- a/src/GraphicsView/GraphicsView_Viewer.cxx +++ b/src/GraphicsView/GraphicsView_Viewer.cxx @@ -68,13 +68,18 @@ GraphicsView_Viewer::~GraphicsView_Viewer() delete mySelector; } +GraphicsView_ViewFrame* GraphicsView_Viewer::createViewFrame( SUIT_Desktop* theDesktop, QWidget* theWidget ) +{ + return new GraphicsView_ViewFrame( theDesktop, this, theWidget ); +} + //================================================================ // Function : createView // Purpose : //================================================================ SUIT_ViewWindow* GraphicsView_Viewer::createView( SUIT_Desktop* theDesktop ) { - GraphicsView_ViewFrame* aViewFrame = new GraphicsView_ViewFrame( theDesktop, this, myWidget ); + GraphicsView_ViewFrame* aViewFrame = createViewFrame( theDesktop, myWidget ); connect( aViewFrame, SIGNAL( keyPressed( QKeyEvent* ) ), this, SLOT( onKeyEvent( QKeyEvent* ) ) ); @@ -401,7 +406,9 @@ void GraphicsView_Viewer::handleMousePress( QGraphicsSceneMouseEvent* e ) } else if( e->button() == Qt::LeftButton && !( aViewPort->currentBlock() & GraphicsView_ViewPort::BS_Selection ) && - !aViewPort->getHighlightedObject() ) + !aViewPort->getHighlightedObject() && + ( !aViewPort->isDraggingSelectedByLeftButton() || + aViewPort->isDraggingSelectedByLeftButton() && aViewPort->nbSelected() == 0 ) ) { // Start rectangular selection if pulling was not started QPoint p = aViewPort->mapFromScene( e->scenePos() );