Skip to content
Permalink
Browse files

Prevent unwanted mouse cursor changes

  • Loading branch information
nyalldawson committed Oct 6, 2017
1 parent 6ab9c22 commit 8517cfefc5adc150bc623109acda73a3e0497f4b
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/gui/layout/qgslayoutmousehandles.cpp
@@ -23,6 +23,7 @@
#include "qgslayoutitem.h"
#include "qgslayoututils.h"
#include "qgslayoutview.h"
#include "qgslayoutviewtoolselect.h"
#include <QGraphicsView>
#include <QGraphicsSceneHoverEvent>
#include <QPainter>
@@ -532,7 +533,7 @@ void QgsLayoutMouseHandles::setViewportCursor( Qt::CursorShape cursor )
//workaround qt bug #3732 by setting cursor for QGraphicsView viewport,
//rather then setting it directly here

if ( true /* TODO !mLayout->preventCursorChange() */ )
if ( dynamic_cast< QgsLayoutViewToolSelect *>( mView->tool() ) )
{
mView->viewport()->setCursor( cursor );
}
@@ -780,6 +781,11 @@ QSizeF QgsLayoutMouseHandles::calcCursorEdgeOffset( QPointF cursorPos )

case QgsLayoutMouseHandles::ResizeLeftDown:
return QSizeF( sceneMousePos.x(), sceneMousePos.y() - rect().height() );

case MoveItem:
case SelectItem:
case NoAction:
return QSizeF();
}

return QSizeF();

0 comments on commit 8517cfe

Please sign in to comment.
You can’t perform that action at this time.