Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support both 5.5 and 5.6 version of ParaView
[modules/gui.git]
/
src
/
GraphicsView
/
GraphicsView_Viewer.cxx
diff --git
a/src/GraphicsView/GraphicsView_Viewer.cxx
b/src/GraphicsView/GraphicsView_Viewer.cxx
index a8e1511b2c360aec3bb3d834f2eda335abd788f5..cc55ba5d7361d6457e0bc8f6f97680ee21e72fc0 100644
(file)
--- a/
src/GraphicsView/GraphicsView_Viewer.cxx
+++ b/
src/GraphicsView/GraphicsView_Viewer.cxx
@@
-68,13
+68,18
@@
GraphicsView_Viewer::~GraphicsView_Viewer()
delete mySelector;
}
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 )
{
//================================================================
// 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* ) ) );
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 ) &&
}
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() );
{
// Start rectangular selection if pulling was not started
QPoint p = aViewPort->mapFromScene( e->scenePos() );