the annotation toolbar can be moved around again

svn path=/trunk/playground/graphics/okular/; revision=585598
This commit is contained in:
Pino Toscano 2006-09-17 13:01:36 +00:00
parent dbff613876
commit 78bffae1e3

View file

@ -326,6 +326,7 @@ PageViewToolBar::PageViewToolBar( QWidget * parent, QWidget * anchorWidget )
: QWidget( parent ), d( new ToolBarPrivate )
{
setAttribute( Qt::WA_OpaquePaintEvent, true );
setMouseTracking( true );
// initialize values of the private data storage structure
d->anchorWidget = anchorWidget;
@ -423,7 +424,7 @@ void PageViewToolBar::mousePressEvent( QMouseEvent * e )
void PageViewToolBar::mouseMoveEvent( QMouseEvent * e )
{
if ( e->button() != Qt::LeftButton )
if ( ( QApplication::mouseButtons() & Qt::LeftButton ) != Qt::LeftButton )
return;
// compute the nearest side to attach the widget to